build.mk 1.81 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12

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

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


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

TARGETS += $(TRACE_TARGETS)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
50
51
52
53
54
55
SRCS += $(ARCHSRCS)
SRCS += $(TRACE_DUMP_SRCS)
SRCS += $(TRACE_DUMPDIFF_SRCS)
SRCS += $(TRACE_FFT_SRCS)
SRCS += $(TRACE_LIST_SRCS)
SRCS += $(TRACE_VIEW_SRCS)
56
CLEAN += $(TRACE_TARGETS) $(ARCHOBJS) $(LIBDIR)/libtrace.a
57
58
59
60
61
CLEAN += $(TRACE_DUMP_OBJS)
CLEAN += $(TRACE_DUMPDIFF_OBJS)
CLEAN += $(TRACE_FFT_OBJS)
CLEAN += $(TRACE_LIST_OBJS)
CLEAN += $(TRACE_VIEW_OBJS)