Commit | Line | Data |
---|---|---|
2c0ecd28 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 | |
a432da1d JA |
5 | OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \ |
6 | eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \ | |
4b87898e | 7 | rbtree.o |
c11883f7 | 8 | |
a432da1d JA |
9 | OBJS += crc/crc7.o |
10 | OBJS += crc/crc16.o | |
11 | OBJS += crc/crc32.o | |
12 | OBJS += crc/crc64.o | |
13 | OBJS += crc/sha256.o | |
14 | OBJS += crc/sha512.o | |
15 | OBJS += crc/md5.o | |
16 | ||
f8fe35e8 JA |
17 | OBJS += engines/cpu.o |
18 | OBJS += engines/mmap.o | |
19 | OBJS += engines/posixaio.o | |
20 | OBJS += engines/sync.o | |
21 | OBJS += engines/null.o | |
ed92ac0c | 22 | OBJS += engines/net.o |
2c0ecd28 JA |
23 | |
24 | all: depend $(PROGS) $(SCRIPTS) | |
25 | ||
c11883f7 | 26 | fio: $(OBJS) |
871c0fc7 | 27 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt -ldl |
2c0ecd28 JA |
28 | |
29 | clean: | |
30 | -rm -f *.o .depend cscope.out $(PROGS) | |
31 | ||
32 | depend: | |
e9310e05 | 33 | @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend |
2c0ecd28 JA |
34 | |
35 | cscope: | |
36 | @cscope -b | |
37 | ||
38 | INSTALL = install | |
39 | prefix = /usr/local | |
40 | bindir = $(prefix)/bin | |
41 | ||
42 | install: $(PROGS) $(SCRIPTS) | |
43 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) | |
44 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |