CC = gcc
-CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS = -W -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PROGS = fio
SCRIPTS = fio_generate_plots
+OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
+ filesetup.o eta.o verify.o memory.o io_u.o
INSTALL = install
prefix = /usr/local
all: depend $(PROGS) $(SCRIPTS)
$(MAKE) -C engines
-fio: fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o filesetup.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -laio -lm -lrt -ldl
+fio: $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl
clean:
-rm -f *.o .depend cscope.out $(PROGS) engines/*.o