[PATCH] Enable output logging to file instead of stdout
[fio.git] / Makefile
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 all: depend $(PROGS) $(SCRIPTS)
7
8 fio: fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o
9         $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -laio -lm -lrt
10
11 clean:
12         -rm -f *.o .depend cscope.out $(PROGS)
13
14 depend:
15         @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
16
17 cscope:
18         @cscope -b
19
20 INSTALL = install
21 prefix = /usr/local
22 bindir = $(prefix)/bin
23
24 install: $(PROGS) $(SCRIPTS)
25         $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
26         $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
27
28 ifneq ($(wildcard .depend),)
29 include .depend
30 endif