diff options
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index f1537a94a05f..19e37cd14ae4 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -407,6 +407,7 @@ LIB_OBJS += util/thread.o | |||
407 | LIB_OBJS += util/trace-event-parse.o | 407 | LIB_OBJS += util/trace-event-parse.o |
408 | LIB_OBJS += util/trace-event-read.o | 408 | LIB_OBJS += util/trace-event-read.o |
409 | LIB_OBJS += util/trace-event-info.o | 409 | LIB_OBJS += util/trace-event-info.o |
410 | LIB_OBJS += util/trace-event-perl.o | ||
410 | LIB_OBJS += util/svghelper.o | 411 | LIB_OBJS += util/svghelper.o |
411 | LIB_OBJS += util/sort.o | 412 | LIB_OBJS += util/sort.o |
412 | LIB_OBJS += util/hist.o | 413 | LIB_OBJS += util/hist.o |
@@ -489,6 +490,15 @@ else | |||
489 | LIB_OBJS += util/probe-finder.o | 490 | LIB_OBJS += util/probe-finder.o |
490 | endif | 491 | endif |
491 | 492 | ||
493 | PERL_EMBED_LDOPTS = `perl -MExtUtils::Embed -e ldopts` | ||
494 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts` | ||
495 | |||
496 | 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) | ||
497 | BASIC_CFLAGS += -DNO_LIBPERL | ||
498 | else | ||
499 | ALL_LDFLAGS += $(PERL_EMBED_LDOPTS) | ||
500 | endif | ||
501 | |||
492 | ifdef NO_DEMANGLE | 502 | ifdef NO_DEMANGLE |
493 | BASIC_CFLAGS += -DNO_DEMANGLE | 503 | BASIC_CFLAGS += -DNO_DEMANGLE |
494 | else | 504 | else |
@@ -860,6 +870,9 @@ util/hweight.o: ../../lib/hweight.c PERF-CFLAGS | |||
860 | util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS | 870 | util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS |
861 | $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | 871 | $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< |
862 | 872 | ||
873 | util/trace-event-perl.o: util/trace-event-perl.c PERF-CFLAGS | ||
874 | $(QUIET_CC)$(CC) -o util/trace-event-perl.o -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter $< | ||
875 | |||
863 | perf-%$X: %.o $(PERFLIBS) | 876 | perf-%$X: %.o $(PERFLIBS) |
864 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) | 877 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) |
865 | 878 | ||