2 CFLAGS = -W -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
4 SCRIPTS = fio_generate_plots
5 OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
6 filesetup.o eta.o verify.o memory.o io_u.o parse.o
10 bindir = $(prefix)/bin
11 libdir = $(prefix)/lib/fio
13 FIO_INST_DIR = $(subst ','\'',$(prefix))
15 CFLAGS += '-D_INST_PREFIX="$(FIO_INST_DIR)"'
17 all: depend $(PROGS) $(SCRIPTS)
21 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl
24 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
27 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
32 install: $(PROGS) $(SCRIPTS)
33 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
34 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
35 $(INSTALL) -m755 -d $(DESTDIR) $(libdir)
36 $(INSTALL) engines/*.o $(libdir)
38 ifneq ($(wildcard .depend),)