Browse Source

Make the build output cleaner so diagnostics are easier to spot

Signed-off-by: Tom St Denis <[email protected]>
Signed-off-by: Steffen Jaeckel <[email protected]>
Steffen Jaeckel 9 years ago
parent
commit
012dfe8001
1 changed files with 14 additions and 4 deletions
  1. 14 4
      makefile

+ 14 - 4
makefile

@@ -5,13 +5,23 @@
 
 
 include makefile.include
 include makefile.include
 
 
-CFLAGS += -c
-
 # The version
 # The version
 VERSION=1.17
 VERSION=1.17
 
 
 PLATFORM := $(shell uname | sed -e 's/_.*//')
 PLATFORM := $(shell uname | sed -e 's/_.*//')
 
 
+ifeq ($V,1)
+silent=
+else
+silent=@
+endif
+
+%.o: %.c
+ifneq ($V,1)
+	@echo "   * ${CC} $@"
+endif
+	${silent} ${CC} ${CFLAGS} -c $< -o $@
+
 # ranlib tools
 # ranlib tools
 ifndef RANLIB
 ifndef RANLIB
 ifeq ($(PLATFORM), Darwin)
 ifeq ($(PLATFORM), Darwin)
@@ -190,9 +200,9 @@ COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip
 #The default rule for make builds the libtomcrypt library.
 #The default rule for make builds the libtomcrypt library.
 default:library
 default:library
 
 
-#ciphers come in two flavours... enc+dec and enc
+#AES comes in two flavours... enc+dec and enc
 src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
 src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
-	$(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o
+	${silent} ${CC} ${CFLAGS} -DENCRYPT_ONLY -c $< -o $@
 
 
 #These are the rules to make certain object files.
 #These are the rules to make certain object files.
 src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
 src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c