syslet: make sure ring buffer is a power-of-2
[fio.git] / Makefile.FreeBSD
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
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 \
7         rbtree.o
8
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
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
22 OBJS += engines/net.o
23
24 all: depend $(PROGS) $(SCRIPTS)
25
26 fio: $(OBJS)
27         $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lm -ldl -lrt
28
29 clean:
30         -rm -f *.o .depend cscope.out $(PROGS)
31
32 depend:
33         @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend
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)