Jens Axboe | 32cd46a | 2006-06-07 13:40:40 +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 | |
Jens Axboe | 5c4e1db | 2006-06-07 14:17:08 +0200 | [diff] [blame^] | 6 | OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o |
| 7 | |
Jens Axboe | 32cd46a | 2006-06-07 13:40:40 +0200 | [diff] [blame] | 8 | all: depend $(PROGS) $(SCRIPTS) |
| 9 | |
| 10 | fio: fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o |
Jens Axboe | 5c4e1db | 2006-06-07 14:17:08 +0200 | [diff] [blame^] | 11 | $(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lm |
Jens Axboe | 32cd46a | 2006-06-07 13:40:40 +0200 | [diff] [blame] | 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) |