diff options
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 2e7fa3a06806..54a5b50ff312 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -286,11 +286,7 @@ SCRIPT_PERL = | |||
286 | SCRIPT_SH = | 286 | SCRIPT_SH = |
287 | TEST_PROGRAMS = | 287 | TEST_PROGRAMS = |
288 | 288 | ||
289 | # | 289 | SCRIPT_SH += perf-archive.sh |
290 | # No scripts right now: | ||
291 | # | ||
292 | |||
293 | # SCRIPT_SH += perf-am.sh | ||
294 | 290 | ||
295 | # | 291 | # |
296 | # No Perl scripts right now: | 292 | # No Perl scripts right now: |
@@ -315,9 +311,6 @@ PROGRAMS += perf | |||
315 | # List built-in command $C whose implementation cmd_$C() is not in | 311 | # List built-in command $C whose implementation cmd_$C() is not in |
316 | # builtin-$C.o but is linked in as part of some other command. | 312 | # builtin-$C.o but is linked in as part of some other command. |
317 | # | 313 | # |
318 | # None right now: | ||
319 | # | ||
320 | # BUILT_INS += perf-init $X | ||
321 | 314 | ||
322 | # what 'all' will build and 'install' will install, in perfexecdir | 315 | # what 'all' will build and 'install' will install, in perfexecdir |
323 | ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) | 316 | ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) |
@@ -340,6 +333,7 @@ LIB_FILE=libperf.a | |||
340 | LIB_H += ../../include/linux/perf_event.h | 333 | LIB_H += ../../include/linux/perf_event.h |
341 | LIB_H += ../../include/linux/rbtree.h | 334 | LIB_H += ../../include/linux/rbtree.h |
342 | LIB_H += ../../include/linux/list.h | 335 | LIB_H += ../../include/linux/list.h |
336 | LIB_H += ../../include/linux/hash.h | ||
343 | LIB_H += ../../include/linux/stringify.h | 337 | LIB_H += ../../include/linux/stringify.h |
344 | LIB_H += util/include/linux/bitmap.h | 338 | LIB_H += util/include/linux/bitmap.h |
345 | LIB_H += util/include/linux/bitops.h | 339 | LIB_H += util/include/linux/bitops.h |
@@ -363,12 +357,14 @@ LIB_H += util/include/asm/uaccess.h | |||
363 | LIB_H += perf.h | 357 | LIB_H += perf.h |
364 | LIB_H += util/cache.h | 358 | LIB_H += util/cache.h |
365 | LIB_H += util/callchain.h | 359 | LIB_H += util/callchain.h |
360 | LIB_H += util/build-id.h | ||
366 | LIB_H += util/debug.h | 361 | LIB_H += util/debug.h |
367 | LIB_H += util/debugfs.h | 362 | LIB_H += util/debugfs.h |
368 | LIB_H += util/event.h | 363 | LIB_H += util/event.h |
369 | LIB_H += util/exec_cmd.h | 364 | LIB_H += util/exec_cmd.h |
370 | LIB_H += util/types.h | 365 | LIB_H += util/types.h |
371 | LIB_H += util/levenshtein.h | 366 | LIB_H += util/levenshtein.h |
367 | LIB_H += util/map.h | ||
372 | LIB_H += util/parse-options.h | 368 | LIB_H += util/parse-options.h |
373 | LIB_H += util/parse-events.h | 369 | LIB_H += util/parse-events.h |
374 | LIB_H += util/quote.h | 370 | LIB_H += util/quote.h |
@@ -389,12 +385,12 @@ LIB_H += util/sort.h | |||
389 | LIB_H += util/hist.h | 385 | LIB_H += util/hist.h |
390 | LIB_H += util/thread.h | 386 | LIB_H += util/thread.h |
391 | LIB_H += util/trace-event.h | 387 | LIB_H += util/trace-event.h |
392 | LIB_H += util/trace-event-perl.h | ||
393 | LIB_H += util/probe-finder.h | 388 | LIB_H += util/probe-finder.h |
394 | LIB_H += util/probe-event.h | 389 | LIB_H += util/probe-event.h |
395 | 390 | ||
396 | LIB_OBJS += util/abspath.o | 391 | LIB_OBJS += util/abspath.o |
397 | LIB_OBJS += util/alias.o | 392 | LIB_OBJS += util/alias.o |
393 | LIB_OBJS += util/build-id.o | ||
398 | LIB_OBJS += util/config.o | 394 | LIB_OBJS += util/config.o |
399 | LIB_OBJS += util/ctype.o | 395 | LIB_OBJS += util/ctype.o |
400 | LIB_OBJS += util/debugfs.o | 396 | LIB_OBJS += util/debugfs.o |
@@ -431,12 +427,12 @@ LIB_OBJS += util/thread.o | |||
431 | LIB_OBJS += util/trace-event-parse.o | 427 | LIB_OBJS += util/trace-event-parse.o |
432 | LIB_OBJS += util/trace-event-read.o | 428 | LIB_OBJS += util/trace-event-read.o |
433 | LIB_OBJS += util/trace-event-info.o | 429 | LIB_OBJS += util/trace-event-info.o |
434 | LIB_OBJS += util/trace-event-perl.o | 430 | LIB_OBJS += util/trace-event-scripting.o |
435 | LIB_OBJS += util/svghelper.o | 431 | LIB_OBJS += util/svghelper.o |
436 | LIB_OBJS += util/sort.o | 432 | LIB_OBJS += util/sort.o |
437 | LIB_OBJS += util/hist.o | 433 | LIB_OBJS += util/hist.o |
438 | LIB_OBJS += util/data_map.o | ||
439 | LIB_OBJS += util/probe-event.o | 434 | LIB_OBJS += util/probe-event.o |
435 | LIB_OBJS += util/util.o | ||
440 | 436 | ||
441 | BUILTIN_OBJS += builtin-annotate.o | 437 | BUILTIN_OBJS += builtin-annotate.o |
442 | 438 | ||
@@ -451,6 +447,7 @@ BUILTIN_OBJS += builtin-diff.o | |||
451 | BUILTIN_OBJS += builtin-help.o | 447 | BUILTIN_OBJS += builtin-help.o |
452 | BUILTIN_OBJS += builtin-sched.o | 448 | BUILTIN_OBJS += builtin-sched.o |
453 | BUILTIN_OBJS += builtin-buildid-list.o | 449 | BUILTIN_OBJS += builtin-buildid-list.o |
450 | BUILTIN_OBJS += builtin-buildid-cache.o | ||
454 | BUILTIN_OBJS += builtin-list.o | 451 | BUILTIN_OBJS += builtin-list.o |
455 | BUILTIN_OBJS += builtin-record.o | 452 | BUILTIN_OBJS += builtin-record.o |
456 | BUILTIN_OBJS += builtin-report.o | 453 | BUILTIN_OBJS += builtin-report.o |
@@ -460,6 +457,7 @@ BUILTIN_OBJS += builtin-top.o | |||
460 | BUILTIN_OBJS += builtin-trace.o | 457 | BUILTIN_OBJS += builtin-trace.o |
461 | BUILTIN_OBJS += builtin-probe.o | 458 | BUILTIN_OBJS += builtin-probe.o |
462 | BUILTIN_OBJS += builtin-kmem.o | 459 | BUILTIN_OBJS += builtin-kmem.o |
460 | BUILTIN_OBJS += builtin-lock.o | ||
463 | 461 | ||
464 | PERFLIBS = $(LIB_FILE) | 462 | PERFLIBS = $(LIB_FILE) |
465 | 463 | ||
@@ -520,9 +518,23 @@ ifneq ($(shell sh -c "(echo '\#include <EXTERN.h>'; echo '\#include <perl.h>'; e | |||
520 | BASIC_CFLAGS += -DNO_LIBPERL | 518 | BASIC_CFLAGS += -DNO_LIBPERL |
521 | else | 519 | else |
522 | ALL_LDFLAGS += $(PERL_EMBED_LDOPTS) | 520 | ALL_LDFLAGS += $(PERL_EMBED_LDOPTS) |
521 | LIB_OBJS += util/scripting-engines/trace-event-perl.o | ||
523 | LIB_OBJS += scripts/perl/Perf-Trace-Util/Context.o | 522 | LIB_OBJS += scripts/perl/Perf-Trace-Util/Context.o |
524 | endif | 523 | endif |
525 | 524 | ||
525 | ifndef NO_LIBPYTHON | ||
526 | PYTHON_EMBED_LDOPTS = `python-config --ldflags 2>/dev/null` | ||
527 | PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null` | ||
528 | endif | ||
529 | |||
530 | ifneq ($(shell sh -c "(echo '\#include <Python.h>'; echo 'int main(void) { Py_Initialize(); return 0; }') | $(CC) -x c - $(PYTHON_EMBED_CCOPTS) -o /dev/null $(PYTHON_EMBED_LDOPTS) > /dev/null 2>&1 && echo y"), y) | ||
531 | BASIC_CFLAGS += -DNO_LIBPYTHON | ||
532 | else | ||
533 | ALL_LDFLAGS += $(PYTHON_EMBED_LDOPTS) | ||
534 | LIB_OBJS += util/scripting-engines/trace-event-python.o | ||
535 | LIB_OBJS += scripts/python/Perf-Trace-Util/Context.o | ||
536 | endif | ||
537 | |||
526 | ifdef NO_DEMANGLE | 538 | ifdef NO_DEMANGLE |
527 | BASIC_CFLAGS += -DNO_DEMANGLE | 539 | BASIC_CFLAGS += -DNO_DEMANGLE |
528 | else | 540 | else |
@@ -894,12 +906,18 @@ util/hweight.o: ../../lib/hweight.c PERF-CFLAGS | |||
894 | util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS | 906 | util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS |
895 | $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | 907 | $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< |
896 | 908 | ||
897 | util/trace-event-perl.o: util/trace-event-perl.c PERF-CFLAGS | 909 | util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c PERF-CFLAGS |
898 | $(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 $< | 910 | $(QUIET_CC)$(CC) -o util/scripting-engines/trace-event-perl.o -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $< |
899 | 911 | ||
900 | scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c PERF-CFLAGS | 912 | scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c PERF-CFLAGS |
901 | $(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 $< | 913 | $(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 $< |
902 | 914 | ||
915 | util/scripting-engines/trace-event-python.o: util/scripting-engines/trace-event-python.c PERF-CFLAGS | ||
916 | $(QUIET_CC)$(CC) -o util/scripting-engines/trace-event-python.o -c $(ALL_CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $< | ||
917 | |||
918 | scripts/python/Perf-Trace-Util/Context.o: scripts/python/Perf-Trace-Util/Context.c PERF-CFLAGS | ||
919 | $(QUIET_CC)$(CC) -o scripts/python/Perf-Trace-Util/Context.o -c $(ALL_CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs $< | ||
920 | |||
903 | perf-%$X: %.o $(PERFLIBS) | 921 | perf-%$X: %.o $(PERFLIBS) |
904 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) | 922 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) |
905 | 923 | ||
@@ -1009,9 +1027,16 @@ install: all | |||
1009 | $(INSTALL) perf$X '$(DESTDIR_SQ)$(bindir_SQ)' | 1027 | $(INSTALL) perf$X '$(DESTDIR_SQ)$(bindir_SQ)' |
1010 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' | 1028 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' |
1011 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' | 1029 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' |
1030 | $(INSTALL) perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
1012 | $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' | 1031 | $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' |
1013 | $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' | 1032 | $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' |
1014 | $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' | 1033 | $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' |
1034 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' | ||
1035 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' | ||
1036 | $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' | ||
1037 | $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' | ||
1038 | $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' | ||
1039 | |||
1015 | ifdef BUILT_INS | 1040 | ifdef BUILT_INS |
1016 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | 1041 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' |
1017 | $(INSTALL) $(BUILT_INS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | 1042 | $(INSTALL) $(BUILT_INS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' |