build.mk 2.09 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
9
TRACE_TARGETS += $(DIR)/trace2file

10
11
12
13
14

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


15
$(ARCHOBJS): CFLAGS += -Wall -O3 -fPIC
Jeroen Vreeken's avatar
Jeroen Vreeken committed
16
$(LIBDIR)/libtrace.la: libutils.la liblog.la
17
$(LIBDIR)/libtrace.la_LDFLAGS += -lutils -llog -lm
18
19
20
21
22
$(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
23
$(DIR)/trace_dump: libtrace.la
24
$(DIR)/trace_dump_LDFLAGS += -ltrace
25
26
27
28
$(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
29
$(DIR)/trace_dumpdiff: libtrace.la
30
$(DIR)/trace_dumpdiff_LDFLAGS += -ltrace
31
32
33
34
$(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
35
$(DIR)/trace_fft: libtrace.la
36
$(DIR)/trace_fft_LDFLAGS += -ltrace -lm -lfftw3
37
38
39
40
$(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
41
$(DIR)/trace_list: libtrace.la
42
$(DIR)/trace_list_LDFLAGS += -ltrace
43
44
45
46
$(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
47
$(DIR)/trace_view: libtrace.la
48
$(DIR)/trace_view_LDFLAGS += -ltrace
49
50
$(DIR)/trace_view: $(TRACE_VIEW_OBJS)

Jeroen Vreeken's avatar
Jeroen Vreeken committed
51
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)


58
TARGETS += $(TRACE_TARGETS)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
59
60
61
62
63
64
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
65
SRCS += $(TRACE2FILE_SRCS)
66
CLEAN += $(TRACE_TARGETS) $(ARCHOBJS) $(LIBDIR)/libtrace.a
67
68
69
70
71
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
72
CLEAN += $(TRACE2FILE_OBJS)