Commit 285ab8bf authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf build: Add builtin objects building

Move the rest of builtin objects (bench and test are already in)
building under build framework.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Tested-by: default avatarWill 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-mrh2d4kfyi4g1el4kmdcghl8@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f39e042a
perf-y += builtin-bench.o perf-y += builtin-bench.o
perf-y += builtin-annotate.o
perf-y += builtin-diff.o
perf-y += builtin-evlist.o
perf-y += builtin-help.o
perf-y += builtin-sched.o
perf-y += builtin-buildid-list.o
perf-y += builtin-buildid-cache.o
perf-y += builtin-list.o
perf-y += builtin-record.o
perf-y += builtin-report.o
perf-y += builtin-stat.o
perf-y += builtin-timechart.o
perf-y += builtin-top.o
perf-y += builtin-script.o
perf-y += builtin-kmem.o
perf-y += builtin-lock.o
perf-y += builtin-kvm.o
perf-y += builtin-inject.o
perf-y += builtin-mem.o
perf-$(CONFIG_AUDIT) += builtin-trace.o
perf-y += bench/ perf-y += bench/
perf-y += tests/ perf-y += tests/
paths += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))"
paths += -DPERF_INFO_PATH="BUILD_STR($(infodir_SQ))"
paths += -DPERF_MAN_PATH="BUILD_STR($(mandir_SQ))"
CFLAGS_builtin-help.o += $(paths)
CFLAGS_builtin-timechart.o += $(paths)
...@@ -425,26 +425,7 @@ LIB_OBJS += $(OUTPUT)ui/stdio/hist.o ...@@ -425,26 +425,7 @@ LIB_OBJS += $(OUTPUT)ui/stdio/hist.o
LIB_OBJS += $(OUTPUT)arch/common.o LIB_OBJS += $(OUTPUT)arch/common.o
BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
BUILTIN_OBJS += $(OUTPUT)builtin-diff.o
BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o
BUILTIN_OBJS += $(OUTPUT)builtin-help.o
BUILTIN_OBJS += $(OUTPUT)builtin-sched.o
BUILTIN_OBJS += $(OUTPUT)builtin-buildid-list.o
BUILTIN_OBJS += $(OUTPUT)builtin-buildid-cache.o
BUILTIN_OBJS += $(OUTPUT)builtin-list.o
BUILTIN_OBJS += $(OUTPUT)builtin-record.o
BUILTIN_OBJS += $(OUTPUT)builtin-report.o
BUILTIN_OBJS += $(OUTPUT)builtin-stat.o
BUILTIN_OBJS += $(OUTPUT)builtin-timechart.o
BUILTIN_OBJS += $(OUTPUT)builtin-top.o
BUILTIN_OBJS += $(OUTPUT)builtin-script.o
BUILTIN_OBJS += $(OUTPUT)builtin-probe.o BUILTIN_OBJS += $(OUTPUT)builtin-probe.o
BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o
BUILTIN_OBJS += $(OUTPUT)builtin-lock.o
BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o
BUILTIN_OBJS += $(OUTPUT)builtin-inject.o
BUILTIN_OBJS += $(OUTPUT)builtin-mem.o
PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT)
...@@ -486,10 +467,6 @@ ifndef NO_LIBUNWIND ...@@ -486,10 +467,6 @@ ifndef NO_LIBUNWIND
LIB_OBJS += $(OUTPUT)util/unwind-libunwind.o LIB_OBJS += $(OUTPUT)util/unwind-libunwind.o
endif endif
ifndef NO_LIBAUDIT
BUILTIN_OBJS += $(OUTPUT)builtin-trace.o
endif
ifndef NO_SLANG ifndef NO_SLANG
LIB_OBJS += $(OUTPUT)ui/browser.o LIB_OBJS += $(OUTPUT)ui/browser.o
LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
...@@ -573,7 +550,7 @@ PERF_IN := $(OUTPUT)perf-in.o ...@@ -573,7 +550,7 @@ PERF_IN := $(OUTPUT)perf-in.o
export srctree OUTPUT RM CC LD AR CFLAGS V export srctree OUTPUT RM CC LD AR CFLAGS V
build := -f $(srctree)/tools/build/Makefile.build dir=. obj build := -f $(srctree)/tools/build/Makefile.build dir=. obj
$(PERF_IN): FORCE $(PERF_IN): $(OUTPUT)common-cmds.h FORCE
@$(MAKE) $(build)=perf @$(MAKE) $(build)=perf
$(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
...@@ -591,18 +568,6 @@ $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H) ...@@ -591,18 +568,6 @@ $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H)
$(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS) $(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS)
$(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS)
$(OUTPUT)builtin-help.o: builtin-help.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \
'-DPERF_HTML_PATH="$(htmldir_SQ)"' \
'-DPERF_MAN_PATH="$(mandir_SQ)"' \
'-DPERF_INFO_PATH="$(infodir_SQ)"' $<
$(OUTPUT)builtin-timechart.o: builtin-timechart.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \
'-DPERF_HTML_PATH="$(htmldir_SQ)"' \
'-DPERF_MAN_PATH="$(mandir_SQ)"' \
'-DPERF_INFO_PATH="$(infodir_SQ)"' $<
$(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt
$(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt) $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
......
...@@ -456,6 +456,7 @@ ifndef NO_LIBAUDIT ...@@ -456,6 +456,7 @@ ifndef NO_LIBAUDIT
else else
CFLAGS += -DHAVE_LIBAUDIT_SUPPORT CFLAGS += -DHAVE_LIBAUDIT_SUPPORT
EXTLIBS += -laudit EXTLIBS += -laudit
$(call detected,CONFIG_AUDIT)
endif endif
endif endif
...@@ -831,3 +832,6 @@ $(call detected_var,PYTHON_WORD) ...@@ -831,3 +832,6 @@ $(call detected_var,PYTHON_WORD)
ifneq ($(OUTPUT),) ifneq ($(OUTPUT),)
$(call detected_var,OUTPUT) $(call detected_var,OUTPUT)
endif endif
$(call detected_var,htmldir_SQ)
$(call detected_var,infodir_SQ)
$(call detected_var,mandir_SQ)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment