Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf build: Add gtk objects building

Move the gtk objects building under build framework.

Add new gtk build object so it's separated from the rest of the code and
could be librarized.

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-cd27z7vww85nxdq37rkjkkbm@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
88aeea06 cf15c74c

+17 -12
+2
tools/perf/Build
··· 35 35 libperf-y += util/ 36 36 libperf-y += arch/ 37 37 libperf-y += ui/ 38 + 39 + gtk-y += ui/gtk/
+5 -12
tools/perf/Makefile.perf
··· 341 341 342 342 ifndef NO_GTK2 343 343 ALL_PROGRAMS += $(OUTPUT)libperf-gtk.so 344 - 345 - GTK_OBJS += $(OUTPUT)ui/gtk/browser.o 346 - GTK_OBJS += $(OUTPUT)ui/gtk/hists.o 347 - GTK_OBJS += $(OUTPUT)ui/gtk/setup.o 348 - GTK_OBJS += $(OUTPUT)ui/gtk/util.o 349 - GTK_OBJS += $(OUTPUT)ui/gtk/helpline.o 350 - GTK_OBJS += $(OUTPUT)ui/gtk/progress.o 351 - GTK_OBJS += $(OUTPUT)ui/gtk/annotate.o 344 + GTK_IN := $(OUTPUT)gtk-in.o 352 345 353 346 install-gtk: $(OUTPUT)libperf-gtk.so 354 347 $(call QUIET_INSTALL, 'GTK UI') \ ··· 409 416 $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \ 410 417 $(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@ 411 418 412 - $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H) 413 - $(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $< 419 + $(GTK_IN): FORCE 420 + @$(MAKE) $(build)=gtk 414 421 415 - $(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS) 422 + $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) 416 423 $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) 417 424 418 425 $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt ··· 692 699 @$(MAKE) -C config/feature-checks clean >/dev/null 693 700 694 701 clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean 695 - $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS) 702 + $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) 696 703 @find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete 697 704 @$(RM) .config-detected 698 705 $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
+1
tools/perf/config/Makefile
··· 846 846 $(call detected_var,prefix_SQ) 847 847 $(call detected_var,perfexecdir_SQ) 848 848 $(call detected_var,LIBDIR) 849 + $(call detected_var,GTK_CFLAGS)
+9
tools/perf/ui/gtk/Build
··· 1 + CFLAGS_gtk += -fPIC $(GTK_CFLAGS) 2 + 3 + gtk-y += browser.o 4 + gtk-y += hists.o 5 + gtk-y += setup.o 6 + gtk-y += util.o 7 + gtk-y += helpline.o 8 + gtk-y += progress.o 9 + gtk-y += annotate.o