blob: 71b33c88c9c6adee0acc48f51a5f76af75b511c2 [file] [log] [blame]
Jens Axboeebac4652005-12-08 15:25:21 +01001CC = gcc
Jens Axboe3c9b60c2006-11-07 08:36:14 +01002CFLAGS = -W -Wwrite-strings -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Jens Axboeebac4652005-12-08 15:25:21 +01003PROGS = fio
4SCRIPTS = fio_generate_plots
Jens Axboe02bcaa82006-11-24 10:42:00 +01005OBJS = 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 +02006 filesetup.o eta.o verify.o memory.o io_u.o parse.o
Jens Axboeebac4652005-12-08 15:25:21 +01007
Jens Axboe5f350952006-11-07 15:20:59 +01008OBJS += engines/fio-engine-cpu.o
9OBJS += engines/fio-engine-libaio.o
10OBJS += engines/fio-engine-mmap.o
11OBJS += engines/fio-engine-posixaio.o
12OBJS += engines/fio-engine-sg.o
13OBJS += engines/fio-engine-splice.o
14OBJS += engines/fio-engine-sync.o
Jens Axboea94ea282006-11-24 12:37:34 +010015OBJS += engines/fio-engine-null.o
Jens Axboe5f350952006-11-07 15:20:59 +010016
Jens Axboec1d57252006-10-09 19:56:04 +020017INSTALL = install
18prefix = /usr/local
19bindir = $(prefix)/bin
20libdir = $(prefix)/lib/fio
21
Jens Axboeebac4652005-12-08 15:25:21 +010022all: depend $(PROGS) $(SCRIPTS)
23
Jens Axboe2f9ade32006-10-20 11:25:52 +020024fio: $(OBJS)
Jens Axboe5f350952006-11-07 15:20:59 +010025 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt
Jens Axboeebac4652005-12-08 15:25:21 +010026
27clean:
Jens Axboe2866c822006-10-09 15:57:48 +020028 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
Jens Axboeebac4652005-12-08 15:25:21 +010029
30depend:
31 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
32
Jens Axboe592ef982006-06-06 20:58:57 +020033cscope:
34 @cscope -b
35
Jens Axboeebac4652005-12-08 15:25:21 +010036install: $(PROGS) $(SCRIPTS)
37 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
38 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
Jens Axboe2866c822006-10-09 15:57:48 +020039 $(INSTALL) -m755 -d $(DESTDIR) $(libdir)
Jens Axboeebac4652005-12-08 15:25:21 +010040
41ifneq ($(wildcard .depend),)
42include .depend
43endif