mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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>
This commit is contained in:
parent
88aeea06eb
commit
c7355f842b
@ -35,5 +35,6 @@ CFLAGS_builtin-timechart.o += $(paths)
|
||||
libperf-y += util/
|
||||
libperf-y += arch/
|
||||
libperf-y += ui/
|
||||
libperf-y += scripts/
|
||||
|
||||
gtk-y += ui/gtk/
|
||||
|
@ -349,16 +349,6 @@ install-gtk: $(OUTPUT)libperf-gtk.so
|
||||
$(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)'
|
||||
endif
|
||||
|
||||
ifndef NO_LIBPERL
|
||||
LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o
|
||||
LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o
|
||||
endif
|
||||
|
||||
ifndef NO_LIBPYTHON
|
||||
LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
|
||||
LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
|
||||
endif
|
||||
|
||||
ifeq ($(NO_PERF_REGS),0)
|
||||
ifeq ($(ARCH),x86)
|
||||
LIB_H += arch/x86/include/perf_regs.h
|
||||
@ -459,18 +449,6 @@ $(OUTPUT)%.o: %.S
|
||||
$(OUTPUT)%.s: %.S
|
||||
$(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $<
|
||||
|
||||
$(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS
|
||||
$(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 $<
|
||||
|
||||
$(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS
|
||||
$(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 $<
|
||||
|
||||
$(OUTPUT)util/scripting-engines/trace-event-python.o: util/scripting-engines/trace-event-python.c $(OUTPUT)PERF-CFLAGS
|
||||
$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $<
|
||||
|
||||
$(OUTPUT)scripts/python/Perf-Trace-Util/Context.o: scripts/python/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS
|
||||
$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs $<
|
||||
|
||||
$(OUTPUT)perf-%: %.o $(PERFLIBS)
|
||||
$(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS)
|
||||
|
||||
|
@ -518,6 +518,7 @@ else
|
||||
else
|
||||
LDFLAGS += $(PERL_EMBED_LDFLAGS)
|
||||
EXTLIBS += $(PERL_EMBED_LIBADD)
|
||||
$(call detected,CONFIG_LIBPERL)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -577,6 +578,7 @@ else
|
||||
LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
|
||||
EXTLIBS += $(PYTHON_EMBED_LIBADD)
|
||||
LANG_BINDINGS += $(obj-perf)python/perf.so
|
||||
$(call detected,CONFIG_LIBPYTHON)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@ -847,3 +849,5 @@ $(call detected_var,prefix_SQ)
|
||||
$(call detected_var,perfexecdir_SQ)
|
||||
$(call detected_var,LIBDIR)
|
||||
$(call detected_var,GTK_CFLAGS)
|
||||
$(call detected_var,PERL_EMBED_CCOPTS)
|
||||
$(call detected_var,PYTHON_EMBED_CCOPTS)
|
||||
|
2
tools/perf/scripts/Build
Normal file
2
tools/perf/scripts/Build
Normal file
@ -0,0 +1,2 @@
|
||||
libperf-$(CONFIG_LIBPERL) += perl/Perf-Trace-Util/
|
||||
libperf-$(CONFIG_LIBPYTHON) += python/Perf-Trace-Util/
|
3
tools/perf/scripts/perl/Perf-Trace-Util/Build
Normal file
3
tools/perf/scripts/perl/Perf-Trace-Util/Build
Normal file
@ -0,0 +1,3 @@
|
||||
libperf-y += Context.o
|
||||
|
||||
CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default
|
3
tools/perf/scripts/python/Perf-Trace-Util/Build
Normal file
3
tools/perf/scripts/python/Perf-Trace-Util/Build
Normal file
@ -0,0 +1,3 @@
|
||||
libperf-y += Context.o
|
||||
|
||||
CFLAGS_Context.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs
|
@ -88,6 +88,8 @@ libperf-$(CONFIG_DWARF) += dwarf-aux.o
|
||||
libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
|
||||
libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
|
||||
|
||||
libperf-y += scripting-engines/
|
||||
|
||||
CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
|
||||
CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
|
||||
|
||||
|
6
tools/perf/util/scripting-engines/Build
Normal file
6
tools/perf/util/scripting-engines/Build
Normal file
@ -0,0 +1,6 @@
|
||||
libperf-$(CONFIG_LIBPERL) += trace-event-perl.o
|
||||
libperf-$(CONFIG_LIBPYTHON) += trace-event-python.o
|
||||
|
||||
CFLAGS_trace-event-perl.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default
|
||||
|
||||
CFLAGS_trace-event-python.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow
|
Loading…
Reference in New Issue
Block a user