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 | |
c11883f7 | 29 | fio: $(OBJS) |
ba47b7db | 30 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lm |
32cd46a0 | 31 | |
b52ae0af JA |
32 | all: depend $(PROGS) $(SCRIPTS) |
33 | ||
ba47b7db JA |
34 | crc/crc7.o: crc/crc7.c |
35 | $(CC) -o $*.o -c $(CFLAGS) $< | |
36 | crc/crc16.o: crc/crc16.c | |
37 | $(CC) -o $*.o -c $(CFLAGS) $< | |
38 | crc/crc32.o: crc/crc32.c | |
39 | $(CC) -o $*.o -c $(CFLAGS) $< | |
40 | crc/crc64.o: crc/crc64.c | |
41 | $(CC) -o $*.o -c $(CFLAGS) $< | |
42 | crc/sha256.o: crc/sha256.c | |
43 | $(CC) -o $*.o -c $(CFLAGS) $< | |
44 | crc/sha512.o: crc/sha512.c | |
45 | $(CC) -o $*.o -c $(CFLAGS) $< | |
46 | crc/md5.o: crc/md5.c | |
47 | $(CC) -o $*.o -c $(CFLAGS) $< | |
48 | ||
49 | engines/cpu.o: engines/cpu.c | |
50 | $(CC) -o $*.o -c $(CFLAGS) $< | |
51 | engines/mmap.o: engines/mmap.c | |
52 | $(CC) -o $*.o -c $(CFLAGS) $< | |
53 | engines/posixaio.o: engines/posixaio.c | |
54 | $(CC) -o $*.o -c $(CFLAGS) $< | |
55 | engines/sync.o: engines/sync.c | |
56 | $(CC) -o $*.o -c $(CFLAGS) $< | |
57 | engines/net.o: engines/net.c | |
58 | $(CC) -o $*.o -c $(CFLAGS) $< | |
59 | engines/null.o: engines/null.c | |
60 | $(CC) -o $*.o -c $(CFLAGS) $< | |
61 | ||
32cd46a0 | 62 | clean: |
6492b1e5 | 63 | -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core |
32cd46a0 JA |
64 | |
65 | depend: | |
b52ae0af | 66 | @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c crc/*.c 1> .depend |
32cd46a0 JA |
67 | |
68 | cscope: | |
69 | @cscope -b | |
70 | ||
32cd46a0 JA |
71 | install: $(PROGS) $(SCRIPTS) |
72 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) | |
73 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |