Makefile update
[fio.git] / Makefile.FreeBSD
CommitLineData
32cd46a0 1CC = gcc
b52ae0af 2CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INC_DEBUG
32cd46a0
JA
3PROGS = fio
4SCRIPTS = fio_generate_plots
a432da1d
JA
5OBJS = 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
9OBJS += crc/crc7.o
10OBJS += crc/crc16.o
11OBJS += crc/crc32.o
12OBJS += crc/crc64.o
13OBJS += crc/sha256.o
14OBJS += crc/sha512.o
15OBJS += crc/md5.o
16
f8fe35e8
JA
17OBJS += engines/cpu.o
18OBJS += engines/mmap.o
19OBJS += engines/posixaio.o
20OBJS += engines/sync.o
21OBJS += engines/null.o
ed92ac0c 22OBJS += engines/net.o
5c4e1dbc 23
b52ae0af
JA
24INSTALL = install
25prefix = /usr/local
26bindir = $(prefix)/bin
27mandir = $(prefix)/man
32cd46a0 28
c11883f7 29fio: $(OBJS)
ba47b7db 30 $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lm
32cd46a0 31
b52ae0af
JA
32all: depend $(PROGS) $(SCRIPTS)
33
ba47b7db
JA
34crc/crc7.o: crc/crc7.c
35 $(CC) -o $*.o -c $(CFLAGS) $<
36crc/crc16.o: crc/crc16.c
37 $(CC) -o $*.o -c $(CFLAGS) $<
38crc/crc32.o: crc/crc32.c
39 $(CC) -o $*.o -c $(CFLAGS) $<
40crc/crc64.o: crc/crc64.c
41 $(CC) -o $*.o -c $(CFLAGS) $<
42crc/sha256.o: crc/sha256.c
43 $(CC) -o $*.o -c $(CFLAGS) $<
44crc/sha512.o: crc/sha512.c
45 $(CC) -o $*.o -c $(CFLAGS) $<
46crc/md5.o: crc/md5.c
47 $(CC) -o $*.o -c $(CFLAGS) $<
48
49engines/cpu.o: engines/cpu.c
50 $(CC) -o $*.o -c $(CFLAGS) $<
51engines/mmap.o: engines/mmap.c
52 $(CC) -o $*.o -c $(CFLAGS) $<
53engines/posixaio.o: engines/posixaio.c
54 $(CC) -o $*.o -c $(CFLAGS) $<
55engines/sync.o: engines/sync.c
56 $(CC) -o $*.o -c $(CFLAGS) $<
57engines/net.o: engines/net.c
58 $(CC) -o $*.o -c $(CFLAGS) $<
59engines/null.o: engines/null.c
60 $(CC) -o $*.o -c $(CFLAGS) $<
61
32cd46a0 62clean:
6492b1e5 63 -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core
32cd46a0
JA
64
65depend:
b52ae0af 66 @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c crc/*.c 1> .depend
32cd46a0
JA
67
68cscope:
69 @cscope -b
70
32cd46a0
JA
71install: $(PROGS) $(SCRIPTS)
72 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
73 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)