Enable quiet build mode, enable by default
authorJens Axboe <jens.axboe@oracle.com>
Sat, 1 Mar 2008 15:20:13 +0000 (16:20 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Sat, 1 Mar 2008 15:20:13 +0000 (16:20 +0100)
Add V=1 to make flags to force a verbose build.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Makefile

index c2e75ddad53479bf474bad02e01111f66348a55e..090cf615851ba30ca6cc556c324c331e3a19c658 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,15 +29,25 @@ OBJS += engines/net.o
 OBJS += engines/syslet-rw.o
 OBJS += engines/guasi.o
 
+ifneq ($(findstring $(MAKEFLAGS),s),s)
+ifndef V
+       QUIET_CC        = @echo '   ' CC $@;
+       QUIET_AR        = @echo '   ' AR $@;
+       QUIET_LINK      = @echo '   ' LINK $@;
+endif
+endif
+
 INSTALL = install
 prefix = /usr/local
 bindir = $(prefix)/bin
 mandir = $(prefix)/man
 
-all: $(PROGS) $(SCRIPTS)
-
+%.o: %.c
+       $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
 fio: $(OBJS)
-       $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt
+       $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt
+
+all: $(PROGS) $(SCRIPTS)
 
 clean:
        -rm -f *.o .depend cscope.out $(PROGS) engines/*.o crc/*.o core.* core