Unify and fixup error handling
[fio.git] / Makefile
... / ...
CommitLineData
1#CC = /opt/intel/cce/9.1.045/bin/icc
2CC = gcc -W
3DEBUGFLAGS = -D_FORTIFY_SOURCE=2
4OPTFLAGS= -O2 -g
5CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS)
6PROGS = fio
7SCRIPTS = fio_generate_plots
8OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
9 filesetup.o eta.o verify.o memory.o io_u.o parse.o
10
11OBJS += engines/cpu.o
12OBJS += engines/libaio.o
13OBJS += engines/mmap.o
14OBJS += engines/posixaio.o
15OBJS += engines/sg.o
16OBJS += engines/splice.o
17OBJS += engines/sync.o
18OBJS += engines/null.o
19OBJS += engines/net.o
20OBJS += engines/syslet-rw.o
21
22INSTALL = install
23prefix = /usr/local
24bindir = $(prefix)/bin
25libdir = $(prefix)/lib/fio
26
27all: $(PROGS) $(SCRIPTS)
28
29fio: $(OBJS)
30 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt
31
32clean:
33 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
34
35depend:
36 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
37
38cscope:
39 @cscope -b
40
41$(PROGS): | depend
42
43install: $(PROGS) $(SCRIPTS)
44 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
45 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
46
47ifneq ($(wildcard .depend),)
48include .depend
49endif