Commit | Line | Data |
---|---|---|
03e20d68 BC |
1 | CC = gcc-3\r |
2 | DEBUGFLAGS = -DFIO_INC_DEBUG\r | |
3 | OPTFLAGS= -O2 -g $(EXTFLAGS)\r | |
4 | CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS) \r | |
5 | PROGS = fio\r | |
6 | SCRIPTS = fio_generate_plots\r | |
7 | OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \\r | |
8 | eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \\r | |
9 | rbtree.o smalloc.o filehash.o helpers.o profile.o debug.o\r | |
10 | \r | |
11 | OBJS += lib/rand.o\r | |
12 | OBJS += lib/flist_sort.o\r | |
13 | OBJS += lib/num2str.o\r | |
14 | \r | |
15 | OBJS += crc/crc7.o\r | |
16 | OBJS += crc/crc16.o\r | |
17 | OBJS += crc/crc32.o\r | |
18 | OBJS += crc/crc32c.o\r | |
19 | OBJS += crc/crc32c-intel.o\r | |
20 | OBJS += crc/crc64.o\r | |
21 | OBJS += crc/sha1.o\r | |
22 | OBJS += crc/sha256.o\r | |
23 | OBJS += crc/sha512.o\r | |
24 | OBJS += crc/md5.o\r | |
25 | \r | |
26 | OBJS += engines/cpu.o\r | |
27 | OBJS += engines/mmap.o\r | |
28 | OBJS += engines/posixaio.o\r | |
29 | OBJS += engines/sync.o\r | |
30 | OBJS += engines/null.o\r | |
31 | OBJS += engines/net.o\r | |
32 | OBJS += engines/windowsaio.o\r | |
33 | \r | |
34 | SOURCE = eta.c filehash.c filesetup.c fio.c gettime.c init.c ioengines.c \\r | |
35 | io_u.c log.c memory.c mutex.c options.c parse.c rbtree.c smalloc.c \\r | |
36 | stat.c parse.c crc/*.c engines/cpu.c engines/mmap.c \\r | |
37 | engines/posixaio.c engines/sync.c engines/null.c engines/net.c engines/windowsaio.c\r | |
38 | \r | |
39 | ifneq ($(findstring $(MAKEFLAGS),s),s)\r | |
40 | ifndef V\r | |
41 | QUIET_CC = @echo ' ' CC $@;\r | |
42 | QUIET_DEP = @echo ' ' DEP $@;\r | |
43 | endif\r | |
44 | endif\r | |
45 | \r | |
46 | INSTALL = install\r | |
47 | prefix = /usr/local\r | |
48 | bindir = $(prefix)/bin\r | |
49 | mandir = $(prefix)/man\r | |
50 | \r | |
51 | %.o: %.c\r | |
52 | $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<\r | |
53 | fio: $(OBJS)\r | |
54 | $(QUIET_CC)windres os/windows/version.rc -O coff -o version.o\r | |
55 | $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -lrt version.o\r | |
56 | \r | |
57 | depend:\r | |
58 | $(QUIET_DEP)$(CC) -MM $(ALL_CFLAGS) $(SOURCE) 1> .depend\r | |
59 | \r | |
60 | $(PROGS): depend\r | |
61 | \r | |
62 | all: depend $(PROGS) $(SCRIPTS)\r | |
63 | \r | |
64 | clean:\r | |
65 | -rm -f .depend cscope.out $(OBJS) $(PROGS) version.o core.* core\r | |
66 | \r | |
67 | cscope:\r | |
68 | @cscope -b\r | |
69 | \r | |
70 | install: $(PROGS) $(SCRIPTS)\r | |
71 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir)\r | |
72 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)\r | |
73 | $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1\r | |
74 | $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1\r | |
75 | $(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1\r | |
76 | \r | |
77 | ifneq ($(wildcard .depend),)\r | |
78 | include .depend\r | |
79 | endif\r |