Commit | Line | Data |
---|---|---|
32cd46a0 JA |
1 | CC = gcc |
2 | CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 | |
3 | PROGS = fio | |
4 | SCRIPTS = fio_generate_plots | |
02bcaa8c | 5 | OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \ |
4b87898e JA |
6 | filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \ |
7 | rbtree.o | |
c11883f7 | 8 | |
f8fe35e8 JA |
9 | OBJS += engines/cpu.o |
10 | OBJS += engines/mmap.o | |
11 | OBJS += engines/posixaio.o | |
12 | OBJS += engines/sync.o | |
13 | OBJS += engines/null.o | |
ed92ac0c | 14 | OBJS += engines/net.o |
5c4e1dbc | 15 | |
32cd46a0 JA |
16 | all: depend $(PROGS) $(SCRIPTS) |
17 | ||
c11883f7 | 18 | fio: $(OBJS) |
871c0fc7 | 19 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lm -ldl -lrt |
32cd46a0 JA |
20 | |
21 | clean: | |
22 | -rm -f *.o .depend cscope.out $(PROGS) | |
23 | ||
24 | depend: | |
e9310e05 | 25 | @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend |
32cd46a0 JA |
26 | |
27 | cscope: | |
28 | @cscope -b | |
29 | ||
30 | INSTALL = install | |
31 | prefix = /usr/local | |
32 | bindir = $(prefix)/bin | |
33 | ||
34 | install: $(PROGS) $(SCRIPTS) | |
35 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) | |
36 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |