blob: 9c3a967141afdb9a7979b6a0377b610807e17a01 [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 Axboe2f79d992007-03-08 20:27:21 +01006 filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o
Jens Axboec11883f2006-11-23 15:11:53 +01007
Jens Axboef8fe35e2007-02-06 13:29:55 +01008OBJS += engines/cpu.o
9OBJS += engines/mmap.o
10OBJS += engines/posixaio.o
11OBJS += engines/sync.o
12OBJS += engines/null.o
Jens Axboeed92ac02007-02-06 14:43:52 +010013OBJS += engines/net.o
Jens Axboe2c0ecd22006-06-08 13:25:41 +020014
15all: depend $(PROGS) $(SCRIPTS)
16
Jens Axboec11883f2006-11-23 15:11:53 +010017fio: $(OBJS)
Jens Axboe871c0fc2006-12-05 11:56:56 +010018 $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt -ldl
Jens Axboe2c0ecd22006-06-08 13:25:41 +020019
20clean:
21 -rm -f *.o .depend cscope.out $(PROGS)
22
23depend:
Jens Axboee9310e02007-02-22 11:24:59 +010024 @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend
Jens Axboe2c0ecd22006-06-08 13:25:41 +020025
26cscope:
27 @cscope -b
28
29INSTALL = install
30prefix = /usr/local
31bindir = $(prefix)/bin
32
33install: $(PROGS) $(SCRIPTS)
34 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
35 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)