blob: 1a68984d4f8d202ca2f8a38cfb2cfceafe98d253 [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 Axboea94ea282006-11-24 12:37:34 +010012OBJS += engines/fio-engine-null.o
Jens Axboe2c0ecd22006-06-08 13:25:41 +020013
14all: depend $(PROGS) $(SCRIPTS)
15
Jens Axboec11883f2006-11-23 15:11:53 +010016fio: $(OBJS)
Jens Axboe871c0fc2006-12-05 11:56:56 +010017 $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt -ldl
Jens Axboe2c0ecd22006-06-08 13:25:41 +020018
19clean:
20 -rm -f *.o .depend cscope.out $(PROGS)
21
22depend:
23 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
24
25cscope:
26 @cscope -b
27
28INSTALL = install
29prefix = /usr/local
30bindir = $(prefix)/bin
31
32install: $(PROGS) $(SCRIPTS)
33 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
34 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)