blob: b487a05d9c89f2156f2e9dc942492d131197de1f [file] [log] [blame]
Jens Axboe2c0ecd22006-06-08 13:25:41 +02001CC = gcc
2CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
3PROGS = 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 Axboec11883f2006-11-23 15:11:53 +01006 filesetup.o eta.o verify.o memory.o io_u.o parse.o
7
8OBJS += engines/fio-engine-cpu.o
9OBJS += engines/fio-engine-mmap.o
10OBJS += engines/fio-engine-posixaio.o
11OBJS += engines/fio-engine-sync.o
Jens Axboe2c0ecd22006-06-08 13:25:41 +020012
13all: depend $(PROGS) $(SCRIPTS)
14
Jens Axboec11883f2006-11-23 15:11:53 +010015fio: $(OBJS)
Jens Axboe2c0ecd22006-06-08 13:25:41 +020016 $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt
17
18clean:
19 -rm -f *.o .depend cscope.out $(PROGS)
20
21depend:
22 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
23
24cscope:
25 @cscope -b
26
27INSTALL = install
28prefix = /usr/local
29bindir = $(prefix)/bin
30
31install: $(PROGS) $(SCRIPTS)
32 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
33 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)