blob: 2f088b5f07fc732007b83c40500f3ea545456e63 [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 Axboea432da12007-07-30 12:29:37 +02005OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \
6 eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \
Jens Axboecbf69f02008-05-23 13:38:41 +02007 rbtree.o fifo.o smalloc.o filehash.o
Jens Axboec11883f2006-11-23 15:11:53 +01008
Jens Axboea432da12007-07-30 12:29:37 +02009OBJS += crc/crc7.o
10OBJS += crc/crc16.o
11OBJS += crc/crc32.o
12OBJS += crc/crc64.o
13OBJS += crc/sha256.o
14OBJS += crc/sha512.o
15OBJS += crc/md5.o
16
Jens Axboef8fe35e2007-02-06 13:29:55 +010017OBJS += engines/cpu.o
18OBJS += engines/mmap.o
19OBJS += engines/posixaio.o
20OBJS += engines/sync.o
21OBJS += engines/null.o
Jens Axboeed92ac02007-02-06 14:43:52 +010022OBJS += engines/net.o
Jens Axboe2c0ecd22006-06-08 13:25:41 +020023
24all: depend $(PROGS) $(SCRIPTS)
25
Jens Axboec11883f2006-11-23 15:11:53 +010026fio: $(OBJS)
Jens Axboe871c0fc2006-12-05 11:56:56 +010027 $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt -ldl
Jens Axboe2c0ecd22006-06-08 13:25:41 +020028
29clean:
30 -rm -f *.o .depend cscope.out $(PROGS)
31
32depend:
Jens Axboee9310e02007-02-22 11:24:59 +010033 @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend
Jens Axboe2c0ecd22006-06-08 13:25:41 +020034
35cscope:
36 @cscope -b
37
38INSTALL = install
39prefix = /usr/local
40bindir = $(prefix)/bin
41
42install: $(PROGS) $(SCRIPTS)
43 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
44 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)