build.mk 1.74 KB
Newer Older
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

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)


$(LIBDIR)/libtrace.la: $(LIBDIR)/libutils.la $(LIBDIR)/liblog.la
$(LIBDIR)/libtrace.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/libtrace.la: LDFLAGS += -lutils -llog -lm -rpath $(ABSLIBDIR)
$(LIBDIR)/libtrace.la: $(ARCHOBJS)
	$(LIB_LINK)

TRACE_DUMP_SRCS := $(DIR)/trace_dump.c
TRACE_DUMP_OBJS := $(TRACE_DUMP_SRCS:.c=.o)
$(DIR)/trace_dump: $(LIBDIR)/libtrace.la
$(DIR)/trace_dump: LDFLAGS += -ltrace
$(DIR)/trace_dump: $(TRACE_DUMP_OBJS)

TRACE_DUMPDIFF_SRCS := $(DIR)/trace_dumpdiff.c
TRACE_DUMPDIFF_OBJS := $(TRACE_DUMPDIFF_SRCS:.c=.o)
$(DIR)/trace_dumpdiff: $(LIBDIR)/libtrace.la
$(DIR)/trace_dumpdiff: LDFLAGS += -ltrace
$(DIR)/trace_dumpdiff: $(TRACE_DUMPDIFF_OBJS)

TRACE_FFT_SRCS := $(DIR)/trace_fft.c
TRACE_FFT_OBJS := $(TRACE_FFT_SRCS:.c=.o)
$(DIR)/trace_fft: $(LIBDIR)/libtrace.la
$(DIR)/trace_fft: LDFLAGS += -ltrace -lm -lfftw3
$(DIR)/trace_fft: $(TRACE_FFT_OBJS)

TRACE_LIST_SRCS := $(DIR)/trace_list.c
TRACE_LIST_OBJS := $(TRACE_LIST_SRCS:.c=.o)
$(DIR)/trace_list: $(LIBDIR)/libtrace.la
$(DIR)/trace_list: LDFLAGS += -ltrace
$(DIR)/trace_list: $(TRACE_LIST_OBJS)

TRACE_VIEW_SRCS := $(DIR)/trace_view.c
TRACE_VIEW_OBJS := $(TRACE_VIEW_SRCS:.c=.o)
$(DIR)/trace_view: $(LIBDIR)/libtrace.la
$(DIR)/trace_view: LDFLAGS += -ltrace
$(DIR)/trace_view: $(TRACE_VIEW_OBJS)

TARGETS += $(TRACE_TARGETS)
CLEAN += $(TRACE_TARGETS) $(ARCHOBJS)
CLEAN += $(TRACE_DUMP_OBJS)
CLEAN += $(TRACE_DUMPDIFF_OBJS)
CLEAN += $(TRACE_FFT_OBJS)
CLEAN += $(TRACE_LIST_OBJS)
CLEAN += $(TRACE_VIEW_OBJS)