2 DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
3 OPTFLAGS= -O2 -g $(EXTFLAGS)
4 CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS) -fno-omit-frame-pointer -rdynamic
6 SCRIPTS = fio_generate_plots
7 OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \
8 eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \
9 rbtree.o diskutil.o fifo.o blktrace.o smalloc.o filehash.o helpers.o \
16 OBJS += crc/crc32c-intel.o
24 OBJS += engines/libaio.o
25 OBJS += engines/mmap.o
26 OBJS += engines/posixaio.o
28 OBJS += engines/splice.o
29 OBJS += engines/sync.o
30 OBJS += engines/null.o
32 OBJS += engines/syslet-rw.o
33 OBJS += engines/guasi.o
35 ifneq ($(findstring $(MAKEFLAGS),s),s)
37 QUIET_CC = @echo ' ' CC $@;
38 QUIET_DEP = @echo ' ' DEP $@;
44 bindir = $(prefix)/bin
45 mandir = $(prefix)/man
48 $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
50 $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt
53 $(QUIET_DEP)$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c crc/*.c 1> .depend
57 all: depend $(PROGS) $(SCRIPTS)
60 -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core
65 install: $(PROGS) $(SCRIPTS)
66 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
67 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
68 $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
69 $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1
70 $(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1
72 ifneq ($(wildcard .depend),)