1 | lib_LTLIBRARIES = libtrace.la |
---|
2 | include_HEADERS = libtrace.h libtrace_parallel.h |
---|
3 | pkginclude_HEADERS = dagformat.h lt_inttypes.h daglegacy.h \ |
---|
4 | rt_protocol.h erftypes.h pthread_spinlock.h \ |
---|
5 | data-struct/ring_buffer.h data-struct/object_cache.h \ |
---|
6 | data-struct/vector.h \ |
---|
7 | data-struct/deque.h data-struct/linked_list.h \ |
---|
8 | data-struct/buckets.h data-struct/sliding_window.h \ |
---|
9 | data-struct/message_queue.h hash_toeplitz.h \ |
---|
10 | data-struct/simple_circular_buffer.h |
---|
11 | |
---|
12 | AM_CFLAGS=@LIBCFLAGS@ @CFLAG_VISIBILITY@ -pthread |
---|
13 | AM_CXXFLAGS=@LIBCXXFLAGS@ @CFLAG_VISIBILITY@ -pthread |
---|
14 | |
---|
15 | extra_DIST = format_template.c |
---|
16 | NATIVEFORMATS=format_linux_common.c format_linux_ring.c format_linux_int.c format_linux_common.h |
---|
17 | BPFFORMATS=format_bpf.c |
---|
18 | |
---|
19 | if HAVE_DAG |
---|
20 | if DAG2_4 |
---|
21 | DAGSOURCE=format_dag24.c |
---|
22 | else |
---|
23 | DAGSOURCE=format_dag25.c |
---|
24 | endif |
---|
25 | else |
---|
26 | DAGSOURCE= |
---|
27 | endif |
---|
28 | EXTRA_DIST=format_dag24.c format_dag25.c dpdk_libtrace.mk |
---|
29 | |
---|
30 | if HAVE_LLVM |
---|
31 | BPFJITSOURCE=bpf-jit/bpf-jit.cc |
---|
32 | else |
---|
33 | BPFJITSOURCE= |
---|
34 | endif |
---|
35 | |
---|
36 | if HAVE_DPDK |
---|
37 | NATIVEFORMATS+= format_dpdk.c format_dpdkndag.c |
---|
38 | # So we also make libtrace.mk in dpdk otherwise automake tries to expand |
---|
39 | # it too early which I cannot seem to stop unless we use a path that |
---|
40 | # doesn't exist currently |
---|
41 | export RTE_SDK=@RTE_SDK@ |
---|
42 | export RTE_TARGET=@RTE_TARGET@ |
---|
43 | export SAVED_CFLAGS:=$(CFLAGS) |
---|
44 | export SAVED_CXXFLAGS:=$(CXXFLAGS) |
---|
45 | include $(RTE_SDK)/mk/rte.vars.mk |
---|
46 | # We need to add -Wl before the linker otherwise this breaks our build |
---|
47 | # And include any libraries that DPDK might depend upon |
---|
48 | export DPDK_LIBTRACE_MK=dpdk_libtrace.mk |
---|
49 | include $(DPDK_LIBTRACE_MK) |
---|
50 | export CFLAGS += $(SAVED_CFLAGS) |
---|
51 | export CXXFLAGS += $(SAVED_CXXFLAGS) |
---|
52 | endif |
---|
53 | |
---|
54 | if HAVE_WANDDER |
---|
55 | ETSISOURCES=format_etsilive.c |
---|
56 | else |
---|
57 | ETSISOURCES= |
---|
58 | endif |
---|
59 | |
---|
60 | libtrace_la_SOURCES = trace.c trace_parallel.c common.h \ |
---|
61 | format_erf.c format_pcap.c format_legacy.c \ |
---|
62 | format_rt.c format_helper.c format_helper.h format_pcapfile.c \ |
---|
63 | format_duck.c format_tsh.c $(NATIVEFORMATS) $(BPFFORMATS) \ |
---|
64 | format_atmhdr.c format_pcapng.c \ |
---|
65 | libtrace_int.h lt_inttypes.h lt_bswap.h \ |
---|
66 | linktypes.c link_wireless.c byteswap.c \ |
---|
67 | checksum.c checksum.h \ |
---|
68 | protocols_pktmeta.c protocols_l2.c protocols_l3.c \ |
---|
69 | protocols_transport.c protocols.h protocols_ospf.c \ |
---|
70 | protocols_application.c \ |
---|
71 | $(DAGSOURCE) format_erf.h format_ndag.c format_ndag.h \ |
---|
72 | $(BPFJITSOURCE) $(ETSISOURCES) \ |
---|
73 | libtrace_arphrd.h \ |
---|
74 | data-struct/ring_buffer.c data-struct/vector.c \ |
---|
75 | data-struct/message_queue.c data-struct/deque.c \ |
---|
76 | data-struct/sliding_window.c data-struct/object_cache.c \ |
---|
77 | data-struct/linked_list.c hash_toeplitz.c combiner_ordered.c \ |
---|
78 | data-struct/buckets.c data-struct/simple_circular_buffer.c \ |
---|
79 | combiner_sorted.c combiner_unordered.c \ |
---|
80 | pthread_spinlock.c pthread_spinlock.h \ |
---|
81 | strndup.c |
---|
82 | |
---|
83 | if DAG2_4 |
---|
84 | nodist_libtrace_la_SOURCES = dagopts.c dagapi.c |
---|
85 | endif |
---|
86 | |
---|
87 | AM_CPPFLAGS= @ADD_INCLS@ |
---|
88 | libtrace_la_LIBADD = @LIBTRACE_LIBS@ @LTLIBOBJS@ $(DPDKLIBS) |
---|
89 | libtrace_la_LDFLAGS=-version-info @LIBTRACE_MAJOR@:@LIBTRACE_MINOR@:@LIBTRACE_MID@ @ADD_LDFLAGS@ |
---|
90 | dagapi.c: |
---|
91 | cp @DAG_TOOLS_DIR@/dagapi.c . |
---|
92 | |
---|
93 | dagopts.c: |
---|
94 | cp @DAG_TOOLS_DIR@/dagopts.c . |
---|
95 | |
---|
96 | if HAVE_LLVM |
---|
97 | # Rules to build the llvm .cc file from a C description of each opcode. |
---|
98 | bpf-jit/bpf-opcodes.llvm.bc: bpf-jit/bpf-opcodes.c |
---|
99 | $(LLVM_GCC) -std=c99 -c -O0 -emit-llvm $< -o $@ |
---|
100 | |
---|
101 | bpf-jit/bpf-opcodes.llvm.cc: bpf-jit/bpf-opcodes.llvm.bc |
---|
102 | `$(LLVM_CONFIG) --bindir`/llc -march=cpp -cppgen=module $< -o $@ |
---|
103 | |
---|
104 | bpf-jit/bpf-jit.cc: bpf-jit/bpf-opcodes.llvm.cc |
---|
105 | |
---|
106 | EXTRA_DIST+=bpf-jit/bpf-opcodes.c |
---|
107 | BUILT_SOURCES=bpf-jit/bpf-opcodes.llvm.cc |
---|
108 | endif |
---|
109 | CLEANFILES=bpf-jit/bpf-opcodes.llvm.cc bpf-jit/bpf-opcodes.llvm.bc |
---|