blob: 49a4ef92618c77f09796f38e989e5d97b0d4acb2 [file] [log] [blame]
Jens Axboe2c0ecd22006-06-08 13:25:41 +02001CC = gcc
Jens Axboe5921e802008-05-30 15:02:38 +02002CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INC_DEBUG
Jens Axboe2c0ecd22006-06-08 13:25:41 +02003PROGS = 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 \
Jens Axboeff2e2232008-06-13 08:38:35 +02006 eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \
Jens Axboe8e8af3c2010-03-19 16:43:22 +01007 rbtree.o fifo.o smalloc.o filehash.o lib/strsep.o helpers.o solaris.o \
8 profile.o debug.o
Jens Axboec11883f2006-11-23 15:11:53 +01009
Jens Axboe1fbbf722010-03-25 23:03:18 +010010OBJS += lib/rand.o
11
Jens Axboea432da12007-07-30 12:29:37 +020012OBJS += crc/crc7.o
13OBJS += crc/crc16.o
14OBJS += crc/crc32.o
Jens Axboea6cee432008-12-22 11:29:50 +010015OBJS += crc/crc32c.o
16OBJS += crc/crc32c-intel.o
Jens Axboea432da12007-07-30 12:29:37 +020017OBJS += crc/crc64.o
Jens Axboe7c353ce2009-08-09 22:40:33 +020018OBJS += crc/sha1.o
Jens Axboea432da12007-07-30 12:29:37 +020019OBJS += crc/sha256.o
20OBJS += crc/sha512.o
21OBJS += crc/md5.o
22
Jens Axboef8fe35e2007-02-06 13:29:55 +010023OBJS += engines/cpu.o
24OBJS += engines/mmap.o
25OBJS += engines/posixaio.o
26OBJS += engines/sync.o
27OBJS += engines/null.o
Jens Axboeed92ac02007-02-06 14:43:52 +010028OBJS += engines/net.o
Jens Axboe417f0062008-06-02 11:59:30 +020029OBJS += engines/solarisaio.o
Jens Axboe2c0ecd22006-06-08 13:25:41 +020030
Jens Axboe2c0ecd22006-06-08 13:25:41 +020031INSTALL = install
32prefix = /usr/local
33bindir = $(prefix)/bin
Jens Axboe5921e802008-05-30 15:02:38 +020034mandir = $(prefix)/man
35
36%.o: %.c
37 $(CC) -o $*.o -c $(CFLAGS) $<
38fio: $(OBJS)
39 $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt -lnsl -lsocket
40
41all: $(PROGS) $(SCRIPTS)
42
43clean:
Jens Axboe6492b1e2008-06-02 15:57:45 +020044 -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core
Jens Axboe5921e802008-05-30 15:02:38 +020045
46cscope:
47 @cscope -b
Jens Axboe2c0ecd22006-06-08 13:25:41 +020048
49install: $(PROGS) $(SCRIPTS)
50 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
51 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)