Commit | Line | Data |
---|---|---|
32cd46a0 | 1 | CC = gcc |
b52ae0af | 2 | CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INC_DEBUG |
32cd46a0 JA |
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 \ | |
cbf69f0d | 7 | rbtree.o fifo.o smalloc.o filehash.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 |
5c4e1dbc | 23 | |
b52ae0af JA |
24 | INSTALL = install |
25 | prefix = /usr/local | |
26 | bindir = $(prefix)/bin | |
27 | mandir = $(prefix)/man | |
32cd46a0 | 28 | |
b52ae0af JA |
29 | %.o: %.c |
30 | $(CC) -o $*.o -c $(CFLAGS) $< | |
c11883f7 | 31 | fio: $(OBJS) |
871c0fc7 | 32 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lm -ldl -lrt |
32cd46a0 | 33 | |
b52ae0af JA |
34 | all: depend $(PROGS) $(SCRIPTS) |
35 | ||
32cd46a0 | 36 | clean: |
b52ae0af | 37 | -rm -f *.o .depend cscope.out $(PROGS) engines/*.o crc/*.o lib/*.o core.* core |
32cd46a0 JA |
38 | |
39 | depend: | |
b52ae0af | 40 | @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c crc/*.c 1> .depend |
32cd46a0 JA |
41 | |
42 | cscope: | |
43 | @cscope -b | |
44 | ||
32cd46a0 JA |
45 | install: $(PROGS) $(SCRIPTS) |
46 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) | |
47 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |