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 |
Pascal Bleser | b161009 | 2007-01-02 09:17:03 +0100 | [diff] [blame] | 3 | OPTFLAGS= -O2 -g |
| 4 | CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 5 | PROGS = fio |
| 6 | SCRIPTS = fio_generate_plots |
Jens Axboe | 02bcaa8 | 2006-11-24 10:42:00 +0100 | [diff] [blame] | 7 | 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] | 8 | 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] | 9 | |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 10 | OBJS += engines/fio-engine-cpu.o |
| 11 | OBJS += engines/fio-engine-libaio.o |
| 12 | OBJS += engines/fio-engine-mmap.o |
| 13 | OBJS += engines/fio-engine-posixaio.o |
| 14 | OBJS += engines/fio-engine-sg.o |
| 15 | OBJS += engines/fio-engine-splice.o |
| 16 | OBJS += engines/fio-engine-sync.o |
Jens Axboe | a94ea28 | 2006-11-24 12:37:34 +0100 | [diff] [blame] | 17 | OBJS += engines/fio-engine-null.o |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 18 | |
Jens Axboe | c1d5725 | 2006-10-09 19:56:04 +0200 | [diff] [blame] | 19 | INSTALL = install |
| 20 | prefix = /usr/local |
| 21 | bindir = $(prefix)/bin |
| 22 | libdir = $(prefix)/lib/fio |
| 23 | |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 24 | all: depend $(PROGS) $(SCRIPTS) |
| 25 | |
Jens Axboe | 2f9ade3 | 2006-10-20 11:25:52 +0200 | [diff] [blame] | 26 | fio: $(OBJS) |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 27 | $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 28 | |
| 29 | clean: |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 30 | -rm -f *.o .depend cscope.out $(PROGS) engines/*.o |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 31 | |
| 32 | depend: |
| 33 | @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend |
| 34 | |
Jens Axboe | 592ef98 | 2006-06-06 20:58:57 +0200 | [diff] [blame] | 35 | cscope: |
| 36 | @cscope -b |
| 37 | |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 38 | install: $(PROGS) $(SCRIPTS) |
| 39 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) |
| 40 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 41 | |
| 42 | ifneq ($(wildcard .depend),) |
| 43 | include .depend |
| 44 | endif |