diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-12-03 14:10:35 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-03 14:10:42 -0500 |
commit | 23ba90e328fd2326378447cafafa47defdfc83c2 (patch) | |
tree | c1febaf468e0255eedfbedf07a07d8178a0b5ac9 /tools/perf/Makefile | |
parent | e859cf8656043f158b4004ccc8cbbf1ba4f97177 (diff) | |
parent | 8ea339adc0a48236008e59dd21564d71c37b331c (diff) |
Merge branch 'perf/scripting' into perf/core
Merge reason: it's ready for v2.6.33.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index f8537cf812c9..23ec66098bdc 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -409,6 +409,7 @@ LIB_OBJS += util/thread.o | |||
409 | LIB_OBJS += util/trace-event-parse.o | 409 | LIB_OBJS += util/trace-event-parse.o |
410 | LIB_OBJS += util/trace-event-read.o | 410 | LIB_OBJS += util/trace-event-read.o |
411 | LIB_OBJS += util/trace-event-info.o | 411 | LIB_OBJS += util/trace-event-info.o |
412 | LIB_OBJS += util/trace-event-perl.o | ||
412 | LIB_OBJS += util/svghelper.o | 413 | LIB_OBJS += util/svghelper.o |
413 | LIB_OBJS += util/sort.o | 414 | LIB_OBJS += util/sort.o |
414 | LIB_OBJS += util/hist.o | 415 | LIB_OBJS += util/hist.o |
@@ -491,6 +492,16 @@ else | |||
491 | LIB_OBJS += util/probe-finder.o | 492 | LIB_OBJS += util/probe-finder.o |
492 | endif | 493 | endif |
493 | 494 | ||
495 | PERL_EMBED_LDOPTS = `perl -MExtUtils::Embed -e ldopts 2>/dev/null` | ||
496 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` | ||
497 | |||
498 | ifneq ($(shell sh -c "(echo '\#include <EXTERN.h>'; echo '\#include <perl.h>'; echo 'int main(void) { perl_alloc(); return 0; }') | $(CC) -x c - $(PERL_EMBED_CCOPTS) -o /dev/null $(PERL_EMBED_LDOPTS) > /dev/null 2>&1 && echo y"), y) | ||
499 | BASIC_CFLAGS += -DNO_LIBPERL | ||
500 | else | ||
501 | ALL_LDFLAGS += $(PERL_EMBED_LDOPTS) | ||
502 | LIB_OBJS += scripts/perl/Perf-Trace-Util/Context.o | ||
503 | endif | ||
504 | |||
494 | ifdef NO_DEMANGLE | 505 | ifdef NO_DEMANGLE |
495 | BASIC_CFLAGS += -DNO_DEMANGLE | 506 | BASIC_CFLAGS += -DNO_DEMANGLE |
496 | else | 507 | else |
@@ -862,6 +873,12 @@ util/hweight.o: ../../lib/hweight.c PERF-CFLAGS | |||
862 | util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS | 873 | util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS |
863 | $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | 874 | $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< |
864 | 875 | ||
876 | util/trace-event-perl.o: util/trace-event-perl.c PERF-CFLAGS | ||
877 | $(QUIET_CC)$(CC) -o util/trace-event-perl.o -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $< | ||
878 | |||
879 | scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c PERF-CFLAGS | ||
880 | $(QUIET_CC)$(CC) -o scripts/perl/Perf-Trace-Util/Context.o -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs $< | ||
881 | |||
865 | perf-%$X: %.o $(PERFLIBS) | 882 | perf-%$X: %.o $(PERFLIBS) |
866 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) | 883 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) |
867 | 884 | ||
@@ -969,6 +986,13 @@ export perfexec_instdir | |||
969 | install: all | 986 | install: all |
970 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' | 987 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' |
971 | $(INSTALL) perf$X '$(DESTDIR_SQ)$(bindir_SQ)' | 988 | $(INSTALL) perf$X '$(DESTDIR_SQ)$(bindir_SQ)' |
989 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' | ||
990 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' | ||
991 | $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' | ||
992 | $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' | ||
993 | $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' | ||
994 | $(INSTALL) scripts/perl/Perf-Trace-Util/Makefile.PL -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util' | ||
995 | $(INSTALL) scripts/perl/Perf-Trace-Util/README -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util' | ||
972 | ifdef BUILT_INS | 996 | ifdef BUILT_INS |
973 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | 997 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' |
974 | $(INSTALL) $(BUILT_INS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | 998 | $(INSTALL) $(BUILT_INS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' |
@@ -1054,7 +1078,7 @@ distclean: clean | |||
1054 | # $(RM) configure | 1078 | # $(RM) configure |
1055 | 1079 | ||
1056 | clean: | 1080 | clean: |
1057 | $(RM) *.o */*.o $(LIB_FILE) | 1081 | $(RM) *.o */*.o */*/*.o */*/*/*.o $(LIB_FILE) |
1058 | $(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X | 1082 | $(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X |
1059 | $(RM) $(TEST_PROGRAMS) | 1083 | $(RM) $(TEST_PROGRAMS) |
1060 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope* | 1084 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope* |