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 | c11883f | 2006-11-23 15:11:53 +0100 | [diff] [blame] | 6 | filesetup.o eta.o verify.o memory.o io_u.o parse.o |
| 7 | |
| 8 | OBJS += engines/fio-engine-cpu.o |
| 9 | OBJS += engines/fio-engine-mmap.o |
| 10 | OBJS += engines/fio-engine-posixaio.o |
| 11 | OBJS += engines/fio-engine-sync.o |
Jens Axboe | a94ea28 | 2006-11-24 12:37:34 +0100 | [diff] [blame] | 12 | OBJS += engines/fio-engine-null.o |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 13 | |
| 14 | all: depend $(PROGS) $(SCRIPTS) |
| 15 | |
Jens Axboe | c11883f | 2006-11-23 15:11:53 +0100 | [diff] [blame] | 16 | fio: $(OBJS) |
Jens Axboe | 871c0fc | 2006-12-05 11:56:56 +0100 | [diff] [blame^] | 17 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt -ldl |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 18 | |
| 19 | clean: |
| 20 | -rm -f *.o .depend cscope.out $(PROGS) |
| 21 | |
| 22 | depend: |
| 23 | @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend |
| 24 | |
| 25 | cscope: |
| 26 | @cscope -b |
| 27 | |
| 28 | INSTALL = install |
| 29 | prefix = /usr/local |
| 30 | bindir = $(prefix)/bin |
| 31 | |
| 32 | install: $(PROGS) $(SCRIPTS) |
| 33 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) |
| 34 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |