[PATCH] Link in known io engines
[fio.git] / Makefile
... / ...
CommitLineData
1CC = gcc
2CFLAGS = -W -Wwrite-strings -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
3PROGS = fio
4SCRIPTS = fio_generate_plots
5OBJS = 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
7
8OBJS += engines/fio-engine-cpu.o
9OBJS += engines/fio-engine-libaio.o
10OBJS += engines/fio-engine-mmap.o
11OBJS += engines/fio-engine-posixaio.o
12OBJS += engines/fio-engine-sg.o
13OBJS += engines/fio-engine-splice.o
14OBJS += engines/fio-engine-sync.o
15
16INSTALL = install
17prefix = /usr/local
18bindir = $(prefix)/bin
19libdir = $(prefix)/lib/fio
20
21FIO_INST_DIR = $(subst ','\'',$(prefix))
22
23CFLAGS += '-D_INST_PREFIX="$(FIO_INST_DIR)"'
24
25all: depend $(PROGS) $(SCRIPTS)
26
27fio: $(OBJS)
28 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt
29
30clean:
31 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
32
33depend:
34 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
35
36cscope:
37 @cscope -b
38
39install: $(PROGS) $(SCRIPTS)
40 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
41 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
42 $(INSTALL) -m755 -d $(DESTDIR) $(libdir)
43
44ifneq ($(wildcard .depend),)
45include .depend
46endif