blob: 411dda06e41f05ede7416c36bbe34d9ad27e1699 [file] [log] [blame]
Jens Axboe1e97cce2006-12-05 11:44:16 +01001#CC = /opt/intel/cce/9.1.045/bin/icc
2CC = gcc -W
Jens Axboe13ddcb22007-02-07 13:59:21 +01003DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector
Pascal Bleserb1610092007-01-02 09:17:03 +01004OPTFLAGS= -O2 -g
Jens Axboe13ddcb22007-02-07 13:59:21 +01005CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS)
Jens Axboeebac4652005-12-08 15:25:21 +01006PROGS = fio
7SCRIPTS = fio_generate_plots
Jens Axboe02bcaa82006-11-24 10:42:00 +01008OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
Jens Axboecb2c86f2006-10-26 13:48:34 +02009 filesetup.o eta.o verify.o memory.o io_u.o parse.o
Jens Axboeebac4652005-12-08 15:25:21 +010010
Jens Axboef8fe35e2007-02-06 13:29:55 +010011OBJS += 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
Jens Axboeed92ac02007-02-06 14:43:52 +010019OBJS += engines/net.o
Jens Axboe5f350952006-11-07 15:20:59 +010020
Jens Axboec1d57252006-10-09 19:56:04 +020021INSTALL = install
22prefix = /usr/local
23bindir = $(prefix)/bin
24libdir = $(prefix)/lib/fio
25
Jens Axboea37bded2007-02-07 14:03:07 +010026all: $(PROGS) $(SCRIPTS)
Jens Axboeebac4652005-12-08 15:25:21 +010027
Jens Axboe2f9ade32006-10-20 11:25:52 +020028fio: $(OBJS)
Jens Axboe5f350952006-11-07 15:20:59 +010029 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt
Jens Axboeebac4652005-12-08 15:25:21 +010030
31clean:
Jens Axboe2866c822006-10-09 15:57:48 +020032 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
Jens Axboeebac4652005-12-08 15:25:21 +010033
34depend:
35 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
36
Jens Axboe592ef982006-06-06 20:58:57 +020037cscope:
38 @cscope -b
39
Jens Axboea37bded2007-02-07 14:03:07 +010040$(PROGS): | depend
41
Jens Axboeebac4652005-12-08 15:25:21 +010042install: $(PROGS) $(SCRIPTS)
43 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
44 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
Jens Axboeebac4652005-12-08 15:25:21 +010045
46ifneq ($(wildcard .depend),)
47include .depend
48endif