summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 616c474..30f407f 100644
--- a/Makefile
+++ b/Makefile
@@ -28,12 +28,23 @@ capture: capture.o
.PHONY: clean all
+DEFAULT_VERBOSITY=0
+
+# verbosity stuff
+V_CC = $(v_cc_$(V))
+v_cc_ = $(v_cc_$(DEFAULT_VERBOSITY))
+v_cc_0 = @echo " CC " $@;
+
+V_CCLD = $(v_ccld_$(V))
+v_ccld_ = $(v_ccld_$(DEFAULT_VERBOSITY))
+v_ccld_0 = @echo " CCLD " $@;
+
define cc
- $(CC) $(CFLAGS) $($(@:.o=)_CFLAGS) -c -o $@ $<
+ $(V_CC)$(CC) $(CFLAGS) $($(@:.o=)_CFLAGS) -c -o $@ $<
endef
%:
- $(CC) -o $@ $+ $(LDFLAGS) $($@_LIBS)
+ $(V_CCLD)$(CC) -o $@ $+ $(LDFLAGS) $($@_LIBS)
%.o: %.c
$(call cc)
%.o: %.c %.h