blob: 06cdc80b20a8a4fbe9f287f08308f93f881de28f [file] [log] [blame]
Jens Axboe32cd46a2006-06-07 13:40:40 +02001CC = gcc
2CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
3PROGS = fio
4SCRIPTS = fio_generate_plots
5
Jens Axboec11883f2006-11-23 15:11:53 +01006OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
7 filesetup.o eta.o verify.o memory.o io_u.o parse.o
8
9OBJS += engines/fio-engine-cpu.o
10OBJS += engines/fio-engine-mmap.o
11OBJS += engines/fio-engine-posixaio.o
12OBJS += engines/fio-engine-sync.o
Jens Axboe5c4e1db2006-06-07 14:17:08 +020013
Jens Axboe32cd46a2006-06-07 13:40:40 +020014all: depend $(PROGS) $(SCRIPTS)
15
Jens Axboec11883f2006-11-23 15:11:53 +010016fio: $(OBJS)
Jens Axboe5c4e1db2006-06-07 14:17:08 +020017 $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lm
Jens Axboe32cd46a2006-06-07 13:40:40 +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)