Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 1 | CC = gcc |
Jens Axboe | 5921e80 | 2008-05-30 15:02:38 +0200 | [diff] [blame] | 2 | CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INC_DEBUG |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 3 | PROGS = fio |
| 4 | SCRIPTS = fio_generate_plots |
Jens Axboe | a432da1 | 2007-07-30 12:29:37 +0200 | [diff] [blame] | 5 | OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \ |
| 6 | eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \ |
Jens Axboe | 72c234e | 2008-05-30 22:50:09 +0200 | [diff] [blame] | 7 | rbtree.o fifo.o smalloc.o filehash.o lib/strsep.o |
Jens Axboe | c11883f | 2006-11-23 15:11:53 +0100 | [diff] [blame] | 8 | |
Jens Axboe | a432da1 | 2007-07-30 12:29:37 +0200 | [diff] [blame] | 9 | OBJS += crc/crc7.o |
| 10 | OBJS += crc/crc16.o |
| 11 | OBJS += crc/crc32.o |
| 12 | OBJS += crc/crc64.o |
| 13 | OBJS += crc/sha256.o |
| 14 | OBJS += crc/sha512.o |
| 15 | OBJS += crc/md5.o |
| 16 | |
Jens Axboe | f8fe35e | 2007-02-06 13:29:55 +0100 | [diff] [blame] | 17 | OBJS += engines/cpu.o |
| 18 | OBJS += engines/mmap.o |
| 19 | OBJS += engines/posixaio.o |
| 20 | OBJS += engines/sync.o |
| 21 | OBJS += engines/null.o |
Jens Axboe | ed92ac0 | 2007-02-06 14:43:52 +0100 | [diff] [blame] | 22 | OBJS += engines/net.o |
Jens Axboe | 417f006 | 2008-06-02 11:59:30 +0200 | [diff] [blame] | 23 | OBJS += engines/solarisaio.o |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 24 | |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 25 | INSTALL = install |
| 26 | prefix = /usr/local |
| 27 | bindir = $(prefix)/bin |
Jens Axboe | 5921e80 | 2008-05-30 15:02:38 +0200 | [diff] [blame] | 28 | mandir = $(prefix)/man |
| 29 | |
| 30 | %.o: %.c |
| 31 | $(CC) -o $*.o -c $(CFLAGS) $< |
| 32 | fio: $(OBJS) |
| 33 | $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt -lnsl -lsocket |
| 34 | |
| 35 | all: $(PROGS) $(SCRIPTS) |
| 36 | |
| 37 | clean: |
Jens Axboe | 6492b1e | 2008-06-02 15:57:45 +0200 | [diff] [blame^] | 38 | -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core |
Jens Axboe | 5921e80 | 2008-05-30 15:02:38 +0200 | [diff] [blame] | 39 | |
| 40 | cscope: |
| 41 | @cscope -b |
Jens Axboe | 2c0ecd2 | 2006-06-08 13:25:41 +0200 | [diff] [blame] | 42 | |
| 43 | install: $(PROGS) $(SCRIPTS) |
| 44 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) |
| 45 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |