From 7c1678ee985d5dcec06c5a0dbf29005dccadb762 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Fri, 7 Sep 2012 17:28:24 +0800 Subject: [PATCH] Makefile: add verbosity control --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile b/Makefile index 0ee273b..f176368 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,22 @@ PREFIX ?= /usr/local +# ----- Verbosity control ----------------------------------------------------- + +CPP := $(CPP) # make sure changing CC won't affect CPP + +CC_normal := $(CC) + +CC_quiet = @echo " CC " $@ && $(CC_normal) + +ifeq ($(V),1) + CC = $(CC_normal) +else + CC = $(CC_quiet) +endif + +# ----- Rules ----------------------------------------------------------------- + .PHONY: all test clean install uninstall .SECONDARY: