Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 1 | CC = gcc |
| 2 | CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| 3 | PROGS = fio |
| 4 | SCRIPTS = fio_generate_plots |
Jens Axboe | 02bcaa8 | 2006-11-24 10:42:00 +0100 | [diff] [blame] | 5 | OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \ |
Jens Axboe | 2f79d99 | 2007-03-08 20:27:21 +0100 | [diff] [blame] | 6 | filesetup.o eta.o verify.o memory.o io_u.o parse.o mutex.o |
Jens Axboe | c11883f | 2006-11-23 15:11:53 +0100 | [diff] [blame] | 7 | |
Jens Axboe | f8fe35e | 2007-02-06 13:29:55 +0100 | [diff] [blame] | 8 | OBJS += engines/cpu.o |
| 9 | OBJS += engines/mmap.o |
| 10 | OBJS += engines/posixaio.o |
| 11 | OBJS += engines/sync.o |
| 12 | OBJS += engines/null.o |
Jens Axboe | ed92ac0 | 2007-02-06 14:43:52 +0100 | [diff] [blame] | 13 | OBJS += engines/net.o |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 14 | |
| 15 | all: depend $(PROGS) $(SCRIPTS) |
| 16 | |
Jens Axboe | c11883f | 2006-11-23 15:11:53 +0100 | [diff] [blame] | 17 | fio: $(OBJS) |
Jens Axboe | 871c0fc | 2006-12-05 11:56:56 +0100 | [diff] [blame] | 18 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt -ldl |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 19 | |
| 20 | clean: |
| 21 | -rm -f *.o .depend cscope.out $(PROGS) |
| 22 | |
| 23 | depend: |
Jens Axboe | e9310e0 | 2007-02-22 11:24:59 +0100 | [diff] [blame] | 24 | @$(CC) -MM $(ALL_CFLAGS) *.c engines/*.c 1> .depend |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 25 | |
| 26 | cscope: |
| 27 | @cscope -b |
| 28 | |
| 29 | INSTALL = install |
| 30 | prefix = /usr/local |
| 31 | bindir = $(prefix)/bin |
| 32 | |
| 33 | install: $(PROGS) $(SCRIPTS) |
| 34 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) |
| 35 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |