1 | lib_LTLIBRARIES = libtrace.la |
---|
2 | include_HEADERS = libtrace.h dagformat.h lt_inttypes.h daglegacy.h rt_protocol.h erftypes.h |
---|
3 | |
---|
4 | AM_CFLAGS=@LIBCFLAGS@ @CFLAG_VISIBILITY@ |
---|
5 | AM_CXXFLAGS=@LIBCXXFLAGS@ @CFLAG_VISIBILITY@ |
---|
6 | |
---|
7 | extra_DIST = format_template.c |
---|
8 | NATIVEFORMATS=format_linux.c |
---|
9 | BPFFORMATS=format_bpf.c |
---|
10 | |
---|
11 | if HAVE_DAG |
---|
12 | if DAG2_4 |
---|
13 | DAGSOURCE=format_dag24.c |
---|
14 | else |
---|
15 | DAGSOURCE=format_dag25.c |
---|
16 | endif |
---|
17 | else |
---|
18 | DAGSOURCE= |
---|
19 | endif |
---|
20 | EXTRA_DIST=format_dag24.c format_dag25.c |
---|
21 | |
---|
22 | if HAVE_LLVM |
---|
23 | BPFJITSOURCE=bpf-jit/bpf-jit.cc |
---|
24 | else |
---|
25 | BPFJITSOURCE= |
---|
26 | endif |
---|
27 | |
---|
28 | if HAVE_DPDK |
---|
29 | NATIVEFORMATS+= format_dpdk.c |
---|
30 | # So we also make libtrace.mk in dpdk otherwise automake tries to expand |
---|
31 | # it to early which I cannot seem to stop unless we use a path that |
---|
32 | # doesn't exist currently |
---|
33 | export RTE_SDK=@RTE_SDK@ |
---|
34 | export RTE_TARGET=@RTE_TARGET@ |
---|
35 | include $(RTE_SDK)/mk/rte.vars.mk |
---|
36 | # We need to add -Wl before the linker otherwise this breaks our build |
---|
37 | # And include any libraries that DPDK might depend upon |
---|
38 | export DPDK_LIBTRACE_MK=dpdk_libtrace.mk |
---|
39 | include $(DPDK_LIBTRACE_MK) |
---|
40 | endif |
---|
41 | |
---|
42 | libtrace_la_SOURCES = trace.c common.h \ |
---|
43 | format_erf.c format_pcap.c format_legacy.c \ |
---|
44 | format_rt.c format_helper.c format_helper.h format_pcapfile.c \ |
---|
45 | format_duck.c format_tsh.c $(NATIVEFORMATS) $(BPFFORMATS) \ |
---|
46 | format_atmhdr.c \ |
---|
47 | libtrace_int.h lt_inttypes.h lt_bswap.h \ |
---|
48 | linktypes.c link_wireless.c byteswap.c \ |
---|
49 | checksum.c checksum.h \ |
---|
50 | protocols_pktmeta.c protocols_l2.c protocols_l3.c \ |
---|
51 | protocols_transport.c protocols.h protocols_ospf.c \ |
---|
52 | $(DAGSOURCE) format_erf.h \ |
---|
53 | $(BPFJITSOURCE) \ |
---|
54 | libtrace_arphrd.h |
---|
55 | |
---|
56 | if DAG2_4 |
---|
57 | nodist_libtrace_la_SOURCES = dagopts.c dagapi.c |
---|
58 | endif |
---|
59 | |
---|
60 | AM_CPPFLAGS= @ADD_INCLS@ -I../libwandio |
---|
61 | libtrace_la_LIBADD = @LIBTRACE_LIBS@ @LTLIBOBJS@ $(DPDKLIBS) |
---|
62 | libtrace_la_LDFLAGS=-version-info @LIBTRACE_MAJOR@:@LIBTRACE_MINOR@:@LIBTRACE_MID@ @ADD_LDFLAGS@ |
---|
63 | dagapi.c: |
---|
64 | cp @DAG_TOOLS_DIR@/dagapi.c . |
---|
65 | |
---|
66 | dagopts.c: |
---|
67 | cp @DAG_TOOLS_DIR@/dagopts.c . |
---|
68 | |
---|
69 | if HAVE_LLVM |
---|
70 | # Rules to build the llvm .cc file from a C description of each opcode. |
---|
71 | bpf-jit/bpf-opcodes.llvm.bc: bpf-jit/bpf-opcodes.c |
---|
72 | $(LLVM_GCC) -std=c99 -c -O0 -emit-llvm $< -o $@ |
---|
73 | |
---|
74 | bpf-jit/bpf-opcodes.llvm.cc: bpf-jit/bpf-opcodes.llvm.bc |
---|
75 | `$(LLVM_CONFIG) --bindir`/llc -march=cpp -cppgen=module $< -o $@ |
---|
76 | |
---|
77 | bpf-jit/bpf-jit.cc: bpf-jit/bpf-opcodes.llvm.cc |
---|
78 | |
---|
79 | EXTRA_DIST+=bpf-jit/bpf-opcodes.c |
---|
80 | BUILT_SOURCES=bpf-jit/bpf-opcodes.llvm.cc |
---|
81 | endif |
---|
82 | CLEANFILES=bpf-jit/bpf-opcodes.llvm.cc bpf-jit/bpf-opcodes.llvm.bc |
---|