Jens Axboe | 1e97cce | 2006-12-05 11:44:16 +0100 | [diff] [blame] | 1 | #CC = /opt/intel/cce/9.1.045/bin/icc |
| 2 | CC = gcc -W |
Jens Axboe | 13ddcb2 | 2007-02-07 13:59:21 +0100 | [diff] [blame] | 3 | DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector |
Pascal Bleser | b161009 | 2007-01-02 09:17:03 +0100 | [diff] [blame] | 4 | OPTFLAGS= -O2 -g |
Jens Axboe | 13ddcb2 | 2007-02-07 13:59:21 +0100 | [diff] [blame] | 5 | CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 6 | PROGS = fio |
| 7 | SCRIPTS = fio_generate_plots |
Jens Axboe | 02bcaa8 | 2006-11-24 10:42:00 +0100 | [diff] [blame] | 8 | OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \ |
Jens Axboe | cb2c86f | 2006-10-26 13:48:34 +0200 | [diff] [blame] | 9 | filesetup.o eta.o verify.o memory.o io_u.o parse.o |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 10 | |
Jens Axboe | f8fe35e | 2007-02-06 13:29:55 +0100 | [diff] [blame] | 11 | OBJS += engines/cpu.o |
| 12 | OBJS += engines/libaio.o |
| 13 | OBJS += engines/mmap.o |
| 14 | OBJS += engines/posixaio.o |
| 15 | OBJS += engines/sg.o |
| 16 | OBJS += engines/splice.o |
| 17 | OBJS += engines/sync.o |
| 18 | OBJS += engines/null.o |
Jens Axboe | ed92ac0 | 2007-02-06 14:43:52 +0100 | [diff] [blame] | 19 | OBJS += engines/net.o |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 20 | |
Jens Axboe | c1d5725 | 2006-10-09 19:56:04 +0200 | [diff] [blame] | 21 | INSTALL = install |
| 22 | prefix = /usr/local |
| 23 | bindir = $(prefix)/bin |
| 24 | libdir = $(prefix)/lib/fio |
| 25 | |
Jens Axboe | a37bded | 2007-02-07 14:03:07 +0100 | [diff] [blame] | 26 | all: $(PROGS) $(SCRIPTS) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 27 | |
Jens Axboe | 2f9ade3 | 2006-10-20 11:25:52 +0200 | [diff] [blame] | 28 | fio: $(OBJS) |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 29 | $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 30 | |
| 31 | clean: |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 32 | -rm -f *.o .depend cscope.out $(PROGS) engines/*.o |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 33 | |
| 34 | depend: |
| 35 | @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend |
| 36 | |
Jens Axboe | 592ef98 | 2006-06-06 20:58:57 +0200 | [diff] [blame] | 37 | cscope: |
| 38 | @cscope -b |
| 39 | |
Jens Axboe | a37bded | 2007-02-07 14:03:07 +0100 | [diff] [blame] | 40 | $(PROGS): | depend |
| 41 | |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 42 | install: $(PROGS) $(SCRIPTS) |
| 43 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) |
| 44 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 45 | |
| 46 | ifneq ($(wildcard .depend),) |
| 47 | include .depend |
| 48 | endif |