diff options
-rw-r--r-- | Makefile | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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 |