[PATCH] FIO_OPT_RANGE breakage
[fio.git] / Makefile
... / ...
CommitLineData
1CC = gcc
2CFLAGS = -W -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
3PROGS = fio
4SCRIPTS = fio_generate_plots
5OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
6 filesetup.o eta.o verify.o memory.o io_u.o parse.o
7
8INSTALL = install
9prefix = /usr/local
10bindir = $(prefix)/bin
11libdir = $(prefix)/lib/fio
12
13FIO_INST_DIR = $(subst ','\'',$(prefix))
14
15CFLAGS += '-D_INST_PREFIX="$(FIO_INST_DIR)"'
16
17all: depend $(PROGS) $(SCRIPTS)
18 $(MAKE) -C engines
19
20fio: $(OBJS)
21 $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl
22
23clean:
24 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
25
26depend:
27 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
28
29cscope:
30 @cscope -b
31
32install: $(PROGS) $(SCRIPTS)
33 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
34 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
35 $(INSTALL) -m755 -d $(DESTDIR) $(libdir)
36 $(INSTALL) engines/*.o $(libdir)
37
38ifneq ($(wildcard .depend),)
39include .depend
40endif