iowatcher: fixup the Makefile
[blktrace.git] / iowatcher / Makefile
CommitLineData
40e63734
CM
1CC = gcc
2CFLAGS = -Wall -O2 -g -W -Wunused-result
9e066e23
CM
3ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
4
5PROGS = iowatcher
6INSTALL = install
7prefix = /usr/local
8bindir = $(prefix)/bin
9
10export prefix INSTALL
11
12ALL = $(PROGS)
13
14$(PROGS): | depend
15
16all: $(ALL)
17
18%.o: %.c
19 $(CC) -o $*.o -c $(ALL_CFLAGS) $<
20
24e48e03 21iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
9e066e23
CM
22 $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm
23
24depend:
25 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
26
27clean:
28 -rm -f *.o $(PROGS) .depend
29
30install: all
31 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
32 $(INSTALL) -m 755 $(ALL) $(DESTDIR)$(bindir)
33
34ifneq ($(wildcard .depend),)
35include .depend
36endif
37