Makefile updates
[fio.git] / Makefile
index 7c79e910f560dedba4e59f7d8c082b9e233d3ba7..a1e339e39cbc46d369e5582425117b6db27b7654 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ PROGS   = fio
 SCRIPTS = fio_generate_plots
 OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \
        eta.o verify.o memory.o io_u.o parse.o mutex.o sem.o options.o \
-       rbtree.o diskutil.o fifo.o blktrace.o smalloc.o
+       rbtree.o diskutil.o fifo.o blktrace.o smalloc.o filehash.o
 
 OBJS += crc/crc7.o
 OBJS += crc/crc16.o
@@ -32,8 +32,7 @@ OBJS += engines/guasi.o
 ifneq ($(findstring $(MAKEFLAGS),s),s)
 ifndef V
        QUIET_CC        = @echo '   ' CC $@;
-       QUIET_AR        = @echo '   ' AR $@;
-       QUIET_LINK      = @echo '   ' LINK $@;
+       QUIET_DEP       = @echo '   ' DEP $@;
 endif
 endif
 
@@ -42,30 +41,29 @@ prefix = /usr/local
 bindir = $(prefix)/bin
 mandir = $(prefix)/man
 
+ifneq ($(wildcard .depend),)
+include .depend
+endif
+
 %.o: %.c
        $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
 fio: $(OBJS)
        $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt
 
-all: $(PROGS) $(SCRIPTS)
+depend:
+       $(QUIET_DEP)$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c crc/*.[ch] 1> .depend
+
+all: $(PROGS) $(SCRIPTS) depend
 
 clean:
        -rm -f *.o .depend cscope.out $(PROGS) engines/*.o crc/*.o core.* core
 
-depend:
-       @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c crc/*.[ch] 1> .depend
-
 cscope:
        @cscope -b
 
-$(PROGS): depend
-
 install: $(PROGS) $(SCRIPTS)
        $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
        $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
        $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
        $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1
 
-ifneq ($(wildcard .depend),)
-include .depend
-endif