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>
This commit is contained in:
parent
cf15c74cbd
commit
88aeea06eb
|
@ -35,3 +35,5 @@ CFLAGS_builtin-timechart.o += $(paths)
|
||||||
libperf-y += util/
|
libperf-y += util/
|
||||||
libperf-y += arch/
|
libperf-y += arch/
|
||||||
libperf-y += ui/
|
libperf-y += ui/
|
||||||
|
|
||||||
|
gtk-y += ui/gtk/
|
||||||
|
|
|
@ -341,14 +341,7 @@ endif
|
||||||
|
|
||||||
ifndef NO_GTK2
|
ifndef NO_GTK2
|
||||||
ALL_PROGRAMS += $(OUTPUT)libperf-gtk.so
|
ALL_PROGRAMS += $(OUTPUT)libperf-gtk.so
|
||||||
|
GTK_IN := $(OUTPUT)gtk-in.o
|
||||||
GTK_OBJS += $(OUTPUT)ui/gtk/browser.o
|
|
||||||
GTK_OBJS += $(OUTPUT)ui/gtk/hists.o
|
|
||||||
GTK_OBJS += $(OUTPUT)ui/gtk/setup.o
|
|
||||||
GTK_OBJS += $(OUTPUT)ui/gtk/util.o
|
|
||||||
GTK_OBJS += $(OUTPUT)ui/gtk/helpline.o
|
|
||||||
GTK_OBJS += $(OUTPUT)ui/gtk/progress.o
|
|
||||||
GTK_OBJS += $(OUTPUT)ui/gtk/annotate.o
|
|
||||||
|
|
||||||
install-gtk: $(OUTPUT)libperf-gtk.so
|
install-gtk: $(OUTPUT)libperf-gtk.so
|
||||||
$(call QUIET_INSTALL, 'GTK UI') \
|
$(call QUIET_INSTALL, 'GTK UI') \
|
||||||
|
@ -416,10 +409,10 @@ $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN)
|
||||||
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \
|
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \
|
||||||
$(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@
|
$(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@
|
||||||
|
|
||||||
$(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H)
|
$(GTK_IN): FORCE
|
||||||
$(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $<
|
@$(MAKE) $(build)=gtk
|
||||||
|
|
||||||
$(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS)
|
$(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS)
|
||||||
$(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS)
|
$(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS)
|
||||||
|
|
||||||
$(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt
|
$(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt
|
||||||
|
@ -699,7 +692,7 @@ config-clean:
|
||||||
@$(MAKE) -C config/feature-checks clean >/dev/null
|
@$(MAKE) -C config/feature-checks clean >/dev/null
|
||||||
|
|
||||||
clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean
|
clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean
|
||||||
$(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)
|
$(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS)
|
||||||
@find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
@find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
||||||
@$(RM) .config-detected
|
@$(RM) .config-detected
|
||||||
$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
|
$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
|
||||||
|
|
|
@ -846,3 +846,4 @@ $(call detected_var,ETC_PERFCONFIG_SQ)
|
||||||
$(call detected_var,prefix_SQ)
|
$(call detected_var,prefix_SQ)
|
||||||
$(call detected_var,perfexecdir_SQ)
|
$(call detected_var,perfexecdir_SQ)
|
||||||
$(call detected_var,LIBDIR)
|
$(call detected_var,LIBDIR)
|
||||||
|
$(call detected_var,GTK_CFLAGS)
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
CFLAGS_gtk += -fPIC $(GTK_CFLAGS)
|
||||||
|
|
||||||
|
gtk-y += browser.o
|
||||||
|
gtk-y += hists.o
|
||||||
|
gtk-y += setup.o
|
||||||
|
gtk-y += util.o
|
||||||
|
gtk-y += helpline.o
|
||||||
|
gtk-y += progress.o
|
||||||
|
gtk-y += annotate.o
|
Loading…
Reference in New Issue