blob: fd1029bc5f38b2e518c6dde55db375b79d0bdfb2 [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 \
6 eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \
Jens Axboe72c234e2008-05-30 22:50:09 +02007 rbtree.o fifo.o smalloc.o filehash.o lib/strsep.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 Axboe417f0062008-06-02 11:59:30 +020023OBJS += engines/solarisaio.o
Jens Axboe2c0ecd22006-06-08 13:25:41 +020024
Jens Axboe2c0ecd22006-06-08 13:25:41 +020025INSTALL = install
26prefix = /usr/local
27bindir = $(prefix)/bin
Jens Axboe5921e802008-05-30 15:02:38 +020028mandir = $(prefix)/man
29
30%.o: %.c
31 $(CC) -o $*.o -c $(CFLAGS) $<
32fio: $(OBJS)
33 $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt -lnsl -lsocket
34
35all: $(PROGS) $(SCRIPTS)
36
37clean:
Jens Axboe6492b1e2008-06-02 15:57:45 +020038 -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core
Jens Axboe5921e802008-05-30 15:02:38 +020039
40cscope:
41 @cscope -b
Jens Axboe2c0ecd22006-06-08 13:25:41 +020042
43install: $(PROGS) $(SCRIPTS)
44 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
45 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)