blob: 63289e685cf8f357b00bddd0f9564d8ee46600f6 [file] [log] [blame]
Jens Axboe1e97cce2006-12-05 11:44:16 +01001#CC = /opt/intel/cce/9.1.045/bin/icc
2CC = gcc -W
Jens Axboeab5d6752007-02-09 09:31:05 +01003DEBUGFLAGS = -D_FORTIFY_SOURCE=2
Pascal Bleserb1610092007-01-02 09:17:03 +01004OPTFLAGS= -O2 -g
Joel Becker9728ce32007-03-01 08:24:39 +01005CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS) -rdynamic
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 Axboe07739b52007-03-08 20:25:46 +01009 filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.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 Axboea4f4fdd2007-02-14 01:16:39 +010020OBJS += engines/syslet-rw.o
Jens Axboe5f350952006-11-07 15:20:59 +010021
Jens Axboec1d57252006-10-09 19:56:04 +020022INSTALL = install
23prefix = /usr/local
24bindir = $(prefix)/bin
Jens Axboec1d57252006-10-09 19:56:04 +020025
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 Axboe6bb1c842007-02-19 16:01:32 +010032 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o core.* core
Jens Axboeebac4652005-12-08 15:25:21 +010033
34depend:
Jens Axboee9310e02007-02-22 11:24:59 +010035 @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend
Jens Axboeebac4652005-12-08 15:25:21 +010036
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