Correct basename usage for verify dump
[fio.git] / Makefile
CommitLineData
12cbb469 1CC = gcc
79e48f72 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 -ldl -lrt -laio
ebac4655
JA
8PROGS = fio
9SCRIPTS = fio_generate_plots
9b836561
BC
10
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 diskutil.c fifo.c blktrace.c smalloc.c filehash.c helpers.c \
14 cgroup.c profile.c debug.c trim.c lib/rand.c lib/flist_sort.c \
15 lib/num2str.c $(wildcard crc/*.c) engines/cpu.c engines/libaio.c \
16 engines/mmap.c engines/posixaio.c engines/sg.c engines/splice.c \
17 engines/sync.c engines/null.c engines/net.c engines/syslet-rw.c \
18 engines/guasi.c engines/binject.c profiles/tiobench.c
19
20OBJS = $(SOURCE:.c=.o)
79d16311 21
4c3ecec4
JA
22ifneq ($(findstring $(MAKEFLAGS),s),s)
23ifndef V
24 QUIET_CC = @echo ' ' CC $@;
0b2d6a7a 25 QUIET_DEP = @echo ' ' DEP $@;
4c3ecec4
JA
26endif
27endif
28
c1d5725e
JA
29INSTALL = install
30prefix = /usr/local
31bindir = $(prefix)/bin
d60e92d1 32mandir = $(prefix)/man
c1d5725e 33
9b836561
BC
34.c.o:
35 $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
36
2f9ade3c 37fio: $(OBJS)
9b836561 38 $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(LIBS) $(OBJS)
4c3ecec4 39
0b2d6a7a 40depend:
9b836561 41 $(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
0b2d6a7a 42
06fecb4e
JA
43$(PROGS): depend
44
45all: depend $(PROGS) $(SCRIPTS)
ebac4655
JA
46
47clean:
0d29de83 48 -rm -f .depend $(OBJS) $(PROGS) core.* core
ebac4655 49
592ef98a 50cscope:
366badd3 51 @cscope -b -R
592ef98a 52
ebac4655
JA
53install: $(PROGS) $(SCRIPTS)
54 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
55 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
d60e92d1
AC
56 $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
57 $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1
ccd4f41b 58 $(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1
ebac4655 59
06fecb4e
JA
60ifneq ($(wildcard .depend),)
61include .depend
62endif