summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-04 18:26:51 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-04 18:26:51 +0200
commitd638473cd4b8aad1da630762fe0228f93e15c30a (patch)
tree3cf93d17646f030ac6dfc3c857daddc0bbbfa1ee
parent659a02d3aa2b1b4e16982a3bb87aaf4d7c16ae5a (diff)
downloadcv-d638473cd4b8aad1da630762fe0228f93e15c30a.tar.gz
cv-d638473cd4b8aad1da630762fe0228f93e15c30a.tar.bz2
cv-d638473cd4b8aad1da630762fe0228f93e15c30a.zip
Makefile: Be silent by default
Like automake silent build rules.
-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