Add silent mode to examples Makefiles
[lttng-ust.git] / doc / examples / demo-tracelog / Makefile
index cc6843a88a6c63f453cac4acf8696d3afeb55f63..0d9a20aa62f27ba59af9a8f521cc68b33aa02e55 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl -llttng-ust        # On Linux
 #LIBS = -lc    # On BSD
 LOCAL_CPPFLAGS += -I.
+AM_V_P := :
 
 all: demo-tracelog
 
 demo-tracelog.o: demo-tracelog.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
+               $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 demo-tracelog: demo-tracelog.o
-       $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+       @if $(AM_V_P); then set -x; else echo "  CCLD     $@"; fi; \
+               $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
                -o $@ $< $(LIBS)
 
 .PHONY: clean
This page took 0.024868 seconds and 4 git commands to generate.