File: Makefile

package info (click to toggle)
blktrace 1.1.0-2+deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,216 kB
  • sloc: ansic: 16,550; python: 353; makefile: 218; sh: 147
file content (37 lines) | stat: -rw-r--r-- 668 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
C      = gcc
CFLAGS  = -Wall -O0 -g -W
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

PROGS = iowatcher
INSTALL = install
prefix = /usr/local
bindir = $(prefix)/bin

export prefix INSTALL

ALL = $(PROGS)

$(PROGS): | depend

all: $(ALL)

%.o: %.c
	$(CC) -o $*.o -c $(ALL_CFLAGS) $<

iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm

depend:
	@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend

clean:
	-rm -f *.o $(PROGS) .depend

install: all
	$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
	$(INSTALL) -m 755 $(ALL) $(DESTDIR)$(bindir)

ifneq ($(wildcard .depend),)
include .depend
endif