diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-12-30 07:11:32 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-12 09:49:53 -0500 |
commit | c7355f842bf84ba7b1c9d6378f85bb53c99284b2 (patch) | |
tree | db48a0f60d838f9ac91276be1afe590b93915c9b /tools | |
parent | 88aeea06ebd2192328c83519f07e5768681e29e7 (diff) |
perf build: Add scripts objects building
Move the scripts objects building under build framework to be included
in the libperf build object.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ry8pd41ahwpq9h46i8te33c7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/Build | 1 | ||||
-rw-r--r-- | tools/perf/Makefile.perf | 22 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 4 | ||||
-rw-r--r-- | tools/perf/scripts/Build | 2 | ||||
-rw-r--r-- | tools/perf/scripts/perl/Perf-Trace-Util/Build | 3 | ||||
-rw-r--r-- | tools/perf/scripts/python/Perf-Trace-Util/Build | 3 | ||||
-rw-r--r-- | tools/perf/util/Build | 2 | ||||
-rw-r--r-- | tools/perf/util/scripting-engines/Build | 6 |
8 files changed, 21 insertions, 22 deletions
diff --git a/tools/perf/Build b/tools/perf/Build index a9ff8fd0bff9..133ec649e5a2 100644 --- a/tools/perf/Build +++ b/tools/perf/Build | |||
@@ -35,5 +35,6 @@ CFLAGS_builtin-timechart.o += $(paths) | |||
35 | libperf-y += util/ | 35 | libperf-y += util/ |
36 | libperf-y += arch/ | 36 | libperf-y += arch/ |
37 | libperf-y += ui/ | 37 | libperf-y += ui/ |
38 | libperf-y += scripts/ | ||
38 | 39 | ||
39 | gtk-y += ui/gtk/ | 40 | gtk-y += ui/gtk/ |
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 18ff8aab582a..4705fa9339eb 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -349,16 +349,6 @@ install-gtk: $(OUTPUT)libperf-gtk.so | |||
349 | $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' | 349 | $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' |
350 | endif | 350 | endif |
351 | 351 | ||
352 | ifndef NO_LIBPERL | ||
353 | LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o | ||
354 | LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o | ||
355 | endif | ||
356 | |||
357 | ifndef NO_LIBPYTHON | ||
358 | LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o | ||
359 | LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o | ||
360 | endif | ||
361 | |||
362 | ifeq ($(NO_PERF_REGS),0) | 352 | ifeq ($(NO_PERF_REGS),0) |
363 | ifeq ($(ARCH),x86) | 353 | ifeq ($(ARCH),x86) |
364 | LIB_H += arch/x86/include/perf_regs.h | 354 | LIB_H += arch/x86/include/perf_regs.h |
@@ -459,18 +449,6 @@ $(OUTPUT)%.o: %.S | |||
459 | $(OUTPUT)%.s: %.S | 449 | $(OUTPUT)%.s: %.S |
460 | $(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $< | 450 | $(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $< |
461 | 451 | ||
462 | $(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS | ||
463 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default $< | ||
464 | |||
465 | $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS | ||
466 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default $< | ||
467 | |||
468 | $(OUTPUT)util/scripting-engines/trace-event-python.o: util/scripting-engines/trace-event-python.c $(OUTPUT)PERF-CFLAGS | ||
469 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $< | ||
470 | |||
471 | $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o: scripts/python/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS | ||
472 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs $< | ||
473 | |||
474 | $(OUTPUT)perf-%: %.o $(PERFLIBS) | 452 | $(OUTPUT)perf-%: %.o $(PERFLIBS) |
475 | $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS) | 453 | $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS) |
476 | 454 | ||
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 6b9678248694..e92d1a450867 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -518,6 +518,7 @@ else | |||
518 | else | 518 | else |
519 | LDFLAGS += $(PERL_EMBED_LDFLAGS) | 519 | LDFLAGS += $(PERL_EMBED_LDFLAGS) |
520 | EXTLIBS += $(PERL_EMBED_LIBADD) | 520 | EXTLIBS += $(PERL_EMBED_LIBADD) |
521 | $(call detected,CONFIG_LIBPERL) | ||
521 | endif | 522 | endif |
522 | endif | 523 | endif |
523 | 524 | ||
@@ -577,6 +578,7 @@ else | |||
577 | LDFLAGS += $(PYTHON_EMBED_LDFLAGS) | 578 | LDFLAGS += $(PYTHON_EMBED_LDFLAGS) |
578 | EXTLIBS += $(PYTHON_EMBED_LIBADD) | 579 | EXTLIBS += $(PYTHON_EMBED_LIBADD) |
579 | LANG_BINDINGS += $(obj-perf)python/perf.so | 580 | LANG_BINDINGS += $(obj-perf)python/perf.so |
581 | $(call detected,CONFIG_LIBPYTHON) | ||
580 | endif | 582 | endif |
581 | endif | 583 | endif |
582 | endif | 584 | endif |
@@ -847,3 +849,5 @@ $(call detected_var,prefix_SQ) | |||
847 | $(call detected_var,perfexecdir_SQ) | 849 | $(call detected_var,perfexecdir_SQ) |
848 | $(call detected_var,LIBDIR) | 850 | $(call detected_var,LIBDIR) |
849 | $(call detected_var,GTK_CFLAGS) | 851 | $(call detected_var,GTK_CFLAGS) |
852 | $(call detected_var,PERL_EMBED_CCOPTS) | ||
853 | $(call detected_var,PYTHON_EMBED_CCOPTS) | ||
diff --git a/tools/perf/scripts/Build b/tools/perf/scripts/Build new file mode 100644 index 000000000000..41efd7e368b3 --- /dev/null +++ b/tools/perf/scripts/Build | |||
@@ -0,0 +1,2 @@ | |||
1 | libperf-$(CONFIG_LIBPERL) += perl/Perf-Trace-Util/ | ||
2 | libperf-$(CONFIG_LIBPYTHON) += python/Perf-Trace-Util/ | ||
diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Build b/tools/perf/scripts/perl/Perf-Trace-Util/Build new file mode 100644 index 000000000000..928e110179cb --- /dev/null +++ b/tools/perf/scripts/perl/Perf-Trace-Util/Build | |||
@@ -0,0 +1,3 @@ | |||
1 | libperf-y += Context.o | ||
2 | |||
3 | CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default | ||
diff --git a/tools/perf/scripts/python/Perf-Trace-Util/Build b/tools/perf/scripts/python/Perf-Trace-Util/Build new file mode 100644 index 000000000000..aefc15c9444a --- /dev/null +++ b/tools/perf/scripts/python/Perf-Trace-Util/Build | |||
@@ -0,0 +1,3 @@ | |||
1 | libperf-y += Context.o | ||
2 | |||
3 | CFLAGS_Context.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs | ||
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 0401a80bab09..b0a65429da6c 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build | |||
@@ -88,6 +88,8 @@ libperf-$(CONFIG_DWARF) += dwarf-aux.o | |||
88 | libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o | 88 | libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o |
89 | libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o | 89 | libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o |
90 | 90 | ||
91 | libperf-y += scripting-engines/ | ||
92 | |||
91 | CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" | 93 | CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
92 | CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))" | 94 | CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))" |
93 | 95 | ||
diff --git a/tools/perf/util/scripting-engines/Build b/tools/perf/util/scripting-engines/Build new file mode 100644 index 000000000000..6516e220c247 --- /dev/null +++ b/tools/perf/util/scripting-engines/Build | |||
@@ -0,0 +1,6 @@ | |||
1 | libperf-$(CONFIG_LIBPERL) += trace-event-perl.o | ||
2 | libperf-$(CONFIG_LIBPYTHON) += trace-event-python.o | ||
3 | |||
4 | CFLAGS_trace-event-perl.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default | ||
5 | |||
6 | CFLAGS_trace-event-python.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow | ||