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 |
| 5 | |
| 6 | OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o |
| 7 | |
| 8 | all: depend $(PROGS) $(SCRIPTS) |
| 9 | |
| 10 | fio: fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o |
| 11 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lc -lpthread -lm -laio -lrt |
| 12 | |
| 13 | clean: |
| 14 | -rm -f *.o .depend cscope.out $(PROGS) |
| 15 | |
| 16 | depend: |
| 17 | @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend |
| 18 | |
| 19 | cscope: |
| 20 | @cscope -b |
| 21 | |
| 22 | INSTALL = install |
| 23 | prefix = /usr/local |
| 24 | bindir = $(prefix)/bin |
| 25 | |
| 26 | install: $(PROGS) $(SCRIPTS) |
| 27 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) |
| 28 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |