Add a real semaphore implemtation
[fio.git] / Makefile
CommitLineData
1e97cce9
JA
1#CC = /opt/intel/cce/9.1.045/bin/icc
2CC = gcc -W
ab5d675e 3DEBUGFLAGS = -D_FORTIFY_SOURCE=2
b1610092 4OPTFLAGS= -O2 -g
9728ce37 5CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS) -rdynamic
ebac4655
JA
6PROGS = fio
7SCRIPTS = fio_generate_plots
02bcaa8c 8OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
07739b57 9 filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o
ebac4655 10
f8fe35e8
JA
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
ed92ac0c 19OBJS += engines/net.o
a4f4fdd7 20OBJS += engines/syslet-rw.o
5f350952 21
c1d5725e
JA
22INSTALL = install
23prefix = /usr/local
24bindir = $(prefix)/bin
c1d5725e 25
a37bded3 26all: $(PROGS) $(SCRIPTS)
ebac4655 27
2f9ade3c 28fio: $(OBJS)
5f350952 29 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt
ebac4655
JA
30
31clean:
6bb1c841 32 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o core.* core
ebac4655
JA
33
34depend:
e9310e05 35 @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend
ebac4655 36
592ef98a
JA
37cscope:
38 @cscope -b
39
a37bded3
JA
40$(PROGS): | depend
41
ebac4655
JA
42install: $(PROGS) $(SCRIPTS)
43 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
44 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
45
46ifneq ($(wildcard .depend),)
47include .depend
48endif