blob: 684e8e04277b9fc23a9884ab70cdbc802e22c6d2 [file] [log] [blame]
Jens Axboeebac4652005-12-08 15:25:21 +01001CC = gcc
2CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
3PROGS = fio
4SCRIPTS = fio_generate_plots
5
6all: depend $(PROGS) $(SCRIPTS)
7
Jens Axboe67962092006-06-07 08:45:01 +02008fio: fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o
Jens Axboeebac4652005-12-08 15:25:21 +01009 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -laio -lm -lrt
10
11clean:
Jens Axboe592ef982006-06-06 20:58:57 +020012 -rm -f *.o .depend cscope.out $(PROGS)
Jens Axboeebac4652005-12-08 15:25:21 +010013
14depend:
15 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
16
Jens Axboe592ef982006-06-06 20:58:57 +020017cscope:
18 @cscope -b
19
Jens Axboeebac4652005-12-08 15:25:21 +010020INSTALL = install
21prefix = /usr/local
22bindir = $(prefix)/bin
23
24install: $(PROGS) $(SCRIPTS)
25 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
26 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
27
28ifneq ($(wildcard .depend),)
29include .depend
30endif