From: Jens Axboe Date: Mon, 3 Mar 2008 11:20:26 +0000 (+0100) Subject: Makefile updates X-Git-Tag: fio-1.20-rc1~5 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0b2d6a7a2bf9f49502b9c1161f376fff53727089 Makefile updates Signed-off-by: Jens Axboe --- diff --git a/Makefile b/Makefile index 1380c02c..a1e339e3 100644 --- a/Makefile +++ b/Makefile @@ -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