engines/mmap.c engines/sync.c engines/null.c engines/net.c \
memalign.c server.c client.c iolog.c backend.c libfio.c flow.c \
json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c \
- helpers.c lib/flist_sort.c lib/hweight.c lib/getrusage.c
+ helpers.c lib/flist_sort.c lib/hweight.c lib/getrusage.c \
+ idletime.c
ifdef CONFIG_64BIT_LLP64
CFLAGS += -DBITS_PER_LONG=32
endif
OBJS = $(SOURCE:.c=.o)
+-include $(OBJS:.o=.d)
T_SMALLOC_OBJS = t/stest.o
T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o
mandir = $(prefix)/man
endif
-all: .depend $(PROGS) $(SCRIPTS) FORCE
+all: $(PROGS) $(SCRIPTS) FORCE
.PHONY: all install clean
.PHONY: FORCE cscope
@$(SHELL) ./FIO-VERSION-GEN
-include FIO-VERSION-FILE
-CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"'
+override CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"'
-.c.o: .depend FORCE
+.c.o: FORCE FIO-VERSION-FILE
$(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
-
-init.o: FIO-VERSION-FILE
+ @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $*.c > $*.d
+ @mv -f $*.d $*.d.tmp
+ @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
+ @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
+ sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
+ @rm -f $*.d.tmp
+
+init.o: FIO-VERSION-FILE init.c
$(QUIET_CC)$(CC) -o init.o $(CFLAGS) $(CPPFLAGS) -c init.c
t/stest: $(T_SMALLOC_OBJS)
fio: $(OBJS)
$(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(LDFLAGS)
-.depend: $(SOURCE)
- $(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
-
-$(PROGS): .depend
-
clean: FORCE
- -rm -f .depend $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core FIO-VERSION-FILE config-host.mak config-host.ld cscope.out
+ -rm -f .depend $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core FIO-VERSION-FILE config-host.mak cscope.out *.d
cscope:
@cscope -b -R
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif