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