aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/traceevent/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 46c2f6b7b123..14131cb0522d 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -207,7 +207,7 @@ libtraceevent.so: $(PEVENT_LIB_OBJS)
207libtraceevent.a: $(PEVENT_LIB_OBJS) 207libtraceevent.a: $(PEVENT_LIB_OBJS)
208 $(Q)$(do_build_static_lib) 208 $(Q)$(do_build_static_lib)
209 209
210$(PEVENT_LIB_OBJS): %.o: $(src)/%.c 210$(PEVENT_LIB_OBJS): %.o: $(src)/%.c TRACEEVENT-CFLAGS
211 $(Q)$(do_fpic_compile) 211 $(Q)$(do_fpic_compile)
212 212
213define make_version.h 213define make_version.h
@@ -272,6 +272,16 @@ ifneq ($(dep_includes),)
272 include $(dep_includes) 272 include $(dep_includes)
273endif 273endif
274 274
275### Detect environment changes
276TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):$(ARCH):$(CROSS_COMPILE)
277
278TRACEEVENT-CFLAGS: force
279 @FLAGS='$(TRACK_CFLAGS)'; \
280 if test x"$$FLAGS" != x"`cat TRACEEVENT-CFLAGS 2>/dev/null`" ; then \
281 echo 1>&2 " * new build flags or cross compiler"; \
282 echo "$$FLAGS" >TRACEEVENT-CFLAGS; \
283 fi
284
275tags: force 285tags: force
276 $(RM) tags 286 $(RM) tags
277 find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \ 287 find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \
@@ -297,7 +307,7 @@ install: install_lib
297 307
298clean: 308clean:
299 $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d 309 $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d
300 $(RM) tags TAGS 310 $(RM) TRACEEVENT-CFLAGS tags TAGS
301 311
302endif # skip-makefile 312endif # skip-makefile
303 313