blob: 75bb758096278d704c47ca7fb6652b147d3c462d [file] [log] [blame]
Jens Axboe1e97cce2006-12-05 11:44:16 +01001#CC = /opt/intel/cce/9.1.045/bin/icc
2CC = gcc -W
Pascal Bleserb1610092007-01-02 09:17:03 +01003OPTFLAGS= -O2 -g
4CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS)
Jens Axboeebac4652005-12-08 15:25:21 +01005PROGS = fio
6SCRIPTS = fio_generate_plots
Jens Axboe02bcaa82006-11-24 10:42:00 +01007OBJS = 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 +02008 filesetup.o eta.o verify.o memory.o io_u.o parse.o
Jens Axboeebac4652005-12-08 15:25:21 +01009
Jens Axboe5f350952006-11-07 15:20:59 +010010OBJS += engines/fio-engine-cpu.o
11OBJS += engines/fio-engine-libaio.o
12OBJS += engines/fio-engine-mmap.o
13OBJS += engines/fio-engine-posixaio.o
14OBJS += engines/fio-engine-sg.o
15OBJS += engines/fio-engine-splice.o
16OBJS += engines/fio-engine-sync.o
Jens Axboea94ea282006-11-24 12:37:34 +010017OBJS += engines/fio-engine-null.o
Jens Axboe5f350952006-11-07 15:20:59 +010018
Jens Axboec1d57252006-10-09 19:56:04 +020019INSTALL = install
20prefix = /usr/local
21bindir = $(prefix)/bin
22libdir = $(prefix)/lib/fio
23
Jens Axboeebac4652005-12-08 15:25:21 +010024all: depend $(PROGS) $(SCRIPTS)
25
Jens Axboe2f9ade32006-10-20 11:25:52 +020026fio: $(OBJS)
Jens Axboe5f350952006-11-07 15:20:59 +010027 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt
Jens Axboeebac4652005-12-08 15:25:21 +010028
29clean:
Jens Axboe2866c822006-10-09 15:57:48 +020030 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
Jens Axboeebac4652005-12-08 15:25:21 +010031
32depend:
33 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
34
Jens Axboe592ef982006-06-06 20:58:57 +020035cscope:
36 @cscope -b
37
Jens Axboeebac4652005-12-08 15:25:21 +010038install: $(PROGS) $(SCRIPTS)
39 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
40 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
Jens Axboeebac4652005-12-08 15:25:21 +010041
42ifneq ($(wildcard .depend),)
43include .depend
44endif