build.mk 2.41 KB
Newer Older
1
2
3
4
5
6
7

TRACE_TARGETS += $(LIBDIR)/libtrace.la
TRACE_TARGETS += $(DIR)/trace_dump
TRACE_TARGETS += $(DIR)/trace_dumpdiff
#TRACE_TARGETS += $(DIR)/trace_fft
TRACE_TARGETS += $(DIR)/trace_list
TRACE_TARGETS += $(DIR)/trace_view
Jeroen Vreeken's avatar
Jeroen Vreeken committed
8
TRACE_TARGETS += $(DIR)/trace2file
Tammo Jan Dijkema's avatar
Tammo Jan Dijkema committed
9
TRACE_TARGETS += $(DIR)/trace2port
Jeroen Vreeken's avatar
Jeroen Vreeken committed
10

11
12
13
14
15

ARCHSRCS := $(DIR)/trace.c $(DIR)/trace_tcp.c
ARCHOBJS := $(ARCHSRCS:.c=.lo)


16
$(ARCHOBJS): CFLAGS += -Wall -O3 -fPIC
Jeroen Vreeken's avatar
Jeroen Vreeken committed
17
$(LIBDIR)/libtrace.la: libutils.la liblog.la
18
$(LIBDIR)/libtrace.la_LDFLAGS += -lutils -llog -lm
19
20
21
22
23
$(LIBDIR)/libtrace.la: $(ARCHOBJS)
	$(LIB_LINK)

TRACE_DUMP_SRCS := $(DIR)/trace_dump.c
TRACE_DUMP_OBJS := $(TRACE_DUMP_SRCS:.c=.o)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
24
$(DIR)/trace_dump: libtrace.la
25
$(DIR)/trace_dump_LDFLAGS += -ltrace
26
27
28
29
$(DIR)/trace_dump: $(TRACE_DUMP_OBJS)

TRACE_DUMPDIFF_SRCS := $(DIR)/trace_dumpdiff.c
TRACE_DUMPDIFF_OBJS := $(TRACE_DUMPDIFF_SRCS:.c=.o)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
30
$(DIR)/trace_dumpdiff: libtrace.la
31
$(DIR)/trace_dumpdiff_LDFLAGS += -ltrace
32
33
34
35
$(DIR)/trace_dumpdiff: $(TRACE_DUMPDIFF_OBJS)

TRACE_FFT_SRCS := $(DIR)/trace_fft.c
TRACE_FFT_OBJS := $(TRACE_FFT_SRCS:.c=.o)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
36
$(DIR)/trace_fft: libtrace.la
37
$(DIR)/trace_fft_LDFLAGS += -ltrace -lm -lfftw3
38
39
40
41
$(DIR)/trace_fft: $(TRACE_FFT_OBJS)

TRACE_LIST_SRCS := $(DIR)/trace_list.c
TRACE_LIST_OBJS := $(TRACE_LIST_SRCS:.c=.o)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
42
$(DIR)/trace_list: libtrace.la
43
$(DIR)/trace_list_LDFLAGS += -ltrace
44
45
46
47
$(DIR)/trace_list: $(TRACE_LIST_OBJS)

TRACE_VIEW_SRCS := $(DIR)/trace_view.c
TRACE_VIEW_OBJS := $(TRACE_VIEW_SRCS:.c=.o)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
48
$(DIR)/trace_view: libtrace.la
49
$(DIR)/trace_view_LDFLAGS += -ltrace
50
51
$(DIR)/trace_view: $(TRACE_VIEW_OBJS)

Jeroen Vreeken's avatar
Jeroen Vreeken committed
52
53
54
55
56
57
TRACE2FILE_SRCS := $(DIR)/trace2file.c
TRACE2FILE_OBJS := $(TRACE2FILE_SRCS:.c=.o)
$(DIR)/trace2file: libtrace.la
$(DIR)/trace2file_LDFLAGS += -ltrace
$(DIR)/trace2file: $(TRACE2FILE_OBJS)

Tammo Jan Dijkema's avatar
Tammo Jan Dijkema committed
58
59
60
61
62
63
TRACE2PORT_SRCS := $(DIR)/trace2port.c
TRACE2PORT_OBJS := $(TRACE2PORT_SRCS:.c=.o)
$(DIR)/trace2port.o: CFLAGS += -Wall -O3
$(DIR)/trace2port_LDFLAGS += -lm -ltrace
$(DIR)/trace2port: libtrace.la
$(DIR)/trace2port: $(TRACE2PORT_OBJS)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
64

65
TARGETS += $(TRACE_TARGETS)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
66
67
68
69
70
71
SRCS += $(ARCHSRCS)
SRCS += $(TRACE_DUMP_SRCS)
SRCS += $(TRACE_DUMPDIFF_SRCS)
SRCS += $(TRACE_FFT_SRCS)
SRCS += $(TRACE_LIST_SRCS)
SRCS += $(TRACE_VIEW_SRCS)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
72
SRCS += $(TRACE2FILE_SRCS)
Tammo Jan Dijkema's avatar
Tammo Jan Dijkema committed
73
SRCS += $(TRACE2PORT_SRCS)
74
CLEAN += $(TRACE_TARGETS) $(ARCHOBJS) $(LIBDIR)/libtrace.a
75
76
77
78
79
CLEAN += $(TRACE_DUMP_OBJS)
CLEAN += $(TRACE_DUMPDIFF_OBJS)
CLEAN += $(TRACE_FFT_OBJS)
CLEAN += $(TRACE_LIST_OBJS)
CLEAN += $(TRACE_VIEW_OBJS)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
80
CLEAN += $(TRACE2FILE_OBJS)
Tammo Jan Dijkema's avatar
Tammo Jan Dijkema committed
81
CLEAN += $(TRACE2PORT_OBJS)