Change disk util / eta method from signal to thread
[fio.git] / Makefile.FreeBSD
CommitLineData
32cd46a0 1CC = gcc
5f421004 2DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
9b836561
BC
3CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
4 $(DEBUGFLAGS)
c2019d39 5OPTFLAGS= -O2 -fno-omit-frame-pointer -g $(EXTFLAGS)
9b836561
BC
6CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) -rdynamic
7LIBS = -lpthread -lm -lrt
32cd46a0
JA
8PROGS = fio
9SCRIPTS = fio_generate_plots
c11883f7 10
9b836561
BC
11SOURCE = gettime.c fio.c ioengines.c init.c stat.c log.c time.c filesetup.c \
12 eta.c verify.c memory.c io_u.c parse.c mutex.c options.c rbtree.c \
13 smalloc.c filehash.c helpers.c profile.c debug.c lib/rand.c \
14 lib/flist_sort.c lib/num2str.c $(wildcard crc/*.c) engines/cpu.c \
15 engines/mmap.c engines/posixaio.c engines/sync.c engines/null.c \
16 engines/net.c
1fbbf72e 17
9b836561 18OBJS = $(SOURCE:.c=.o)
5f421004
JA
19
20ifneq ($(findstring $(MAKEFLAGS),s),s)
21ifndef V
22 QUIET_CC = @echo ' ' CC $@;
23 QUIET_DEP = @echo ' ' DEP $@;
24endif
25endif
26
b52ae0af
JA
27INSTALL = install
28prefix = /usr/local
29bindir = $(prefix)/bin
30mandir = $(prefix)/man
32cd46a0 31
9b836561
BC
32.c.o:
33 $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
34
c11883f7 35fio: $(OBJS)
9b836561 36 $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(LIBS) $(OBJS)
32cd46a0 37
5f421004 38depend:
9b836561 39 $(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
b52ae0af 40
5f421004 41$(PROGS): depend
ba47b7db 42
5f421004 43all: depend $(PROGS) $(SCRIPTS)
ba47b7db 44
32cd46a0 45clean:
6492b1e5 46 -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core
32cd46a0 47
32cd46a0
JA
48cscope:
49 @cscope -b
50
32cd46a0
JA
51install: $(PROGS) $(SCRIPTS)
52 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
53 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
5f421004
JA
54 $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
55 $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1
ccd4f41b 56 $(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1
5f421004
JA
57
58ifneq ($(wildcard .depend),)
59include .depend
60endif