Makefile 1.07 KB
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
1

2
CFLAGS+= -Wall -O3 -I../utils/ -I.. -I../include -fPIC
Jeroen Vreeken's avatar
Jeroen Vreeken committed
3
LDFLAGS+= -L../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
4

Jeroen Vreeken's avatar
Jeroen Vreeken committed
5
LOBJS= trace.lo
6
SRCS= trace_dump.c trace_dumpdiff.c trace_fft.c trace_tcp.c trace.c trace_tcp.c
Jeroen Vreeken's avatar
Jeroen Vreeken committed
7

Jeroen Vreeken's avatar
Jeroen Vreeken committed
8
all: libs bins
Jeroen Vreeken's avatar
Jeroen Vreeken committed
9

Jeroen Vreeken's avatar
Jeroen Vreeken committed
10
libs: libtrace.la
Jeroen Vreeken's avatar
Jeroen Vreeken committed
11

Jeroen Vreeken's avatar
Jeroen Vreeken committed
12
libs_install: libtrace.la_install
Jeroen Vreeken's avatar
Jeroen Vreeken committed
13

Jeroen Vreeken's avatar
Jeroen Vreeken committed
14
bins: trace_dump trace_dumpdiff trace_view trace_list
Jeroen Vreeken's avatar
Jeroen Vreeken committed
15

16
17
${CURDIR}/../lib:
	@mkdir ${CURDIR}/../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
18

19
20
libtrace.la_LDFLAGS= -lutils -llog -lm -rpath ${CURDIR}/../lib
libtrace.la: trace.lo trace_tcp.lo
Jeroen Vreeken's avatar
Jeroen Vreeken committed
21

22
libtrace.la_install: libtrace.la ${CURDIR}/../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
23
	@echo "CP $^ to libdir"
24
	@${LIBTOOL} --quiet --mode=install install libtrace.la ${CURDIR}/../lib
Jeroen Vreeken's avatar
Jeroen Vreeken committed
25
26

trace_dump_LDFLAGS= -ltrace -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
27
trace_dump: trace_dump.o libs_install
Jeroen Vreeken's avatar
Jeroen Vreeken committed
28
29

trace_dumpdiff_LDFLAGS= -ltrace -lutils
Jeroen Vreeken's avatar
Jeroen Vreeken committed
30
31
32
33
34
35
36
37
38
39
trace_dumpdiff: trace_dumpdiff.o libs_install

trace_fft_LDFLAGS= -lm -lutils -ltrace -lfftw3
trace_fft: trace_fft.o libs_install

trace_list_LDFLAGS= -ltrace
trace_list: trace_list.o libs_install

trace_view_LDFLAGS= -ltrace
trace_view: trace_view.o libs_install
Jeroen Vreeken's avatar
Jeroen Vreeken committed
40

Jeroen Vreeken's avatar
Jeroen Vreeken committed
41
42

clean:
Jeroen Vreeken's avatar
Jeroen Vreeken committed
43
44
	rm -rf *.o *.a *.d *.lo *.la .libs \
	    trace_dump trace_dumpdiff trace_fft trace_list trace_view
Jeroen Vreeken's avatar
Jeroen Vreeken committed
45
46

include ../build.mk