1 | lib_LTLIBRARIES = libpacketdump.la |
---|
2 | include_HEADERS = libpacketdump.h |
---|
3 | |
---|
4 | plugindir = $(libdir)/libpacketdump |
---|
5 | |
---|
6 | BIN_PROTOCOLS= |
---|
7 | TXT_PROTOCOLS= |
---|
8 | |
---|
9 | # Link layers supported |
---|
10 | # Legacy |
---|
11 | BIN_PROTOCOLS+=link_0.la |
---|
12 | |
---|
13 | # HDLC_POS |
---|
14 | BIN_PROTOCOLS+=link_1.la |
---|
15 | |
---|
16 | # Ethernet |
---|
17 | BIN_PROTOCOLS+=link_2.la |
---|
18 | |
---|
19 | # ATM |
---|
20 | TXT_PROTOCOLS+=link_3.protocol |
---|
21 | |
---|
22 | # 802.11 |
---|
23 | BIN_PROTOCOLS+=link_4.la |
---|
24 | |
---|
25 | # NONE |
---|
26 | # |
---|
27 | |
---|
28 | # Linux SLL |
---|
29 | #TXT_PROTOCOLS+=link_6.protocol |
---|
30 | BIN_PROTOCOLS+=link_6.la |
---|
31 | |
---|
32 | # PFLog |
---|
33 | # |
---|
34 | |
---|
35 | # Obsolete legacy |
---|
36 | # |
---|
37 | |
---|
38 | # Obsolete Legacy ATM |
---|
39 | # |
---|
40 | |
---|
41 | # PoS |
---|
42 | BIN_PROTOCOLS+=link_9.la |
---|
43 | |
---|
44 | # Obsolete Legacy Ethernet |
---|
45 | BIN_PROTOCOLS+=link_10.la |
---|
46 | |
---|
47 | # 802.11 Prism |
---|
48 | BIN_PROTOCOLS+=link_11.la |
---|
49 | |
---|
50 | # 13: AAL5 |
---|
51 | # |
---|
52 | # 14: Duck |
---|
53 | # |
---|
54 | |
---|
55 | # 15: Radiotap |
---|
56 | BIN_PROTOCOLS+=link_15.la |
---|
57 | |
---|
58 | # 16: LLC/SNAP |
---|
59 | # |
---|
60 | # 17: PPP |
---|
61 | TXT_PROTOCOLS+=link_17.protocol |
---|
62 | |
---|
63 | # 22: ETSI LI |
---|
64 | if HAVE_WANDDER |
---|
65 | BIN_PROTOCOLS+=link_22.la |
---|
66 | endif |
---|
67 | |
---|
68 | # Decoders for various ethertypes (in decimal) |
---|
69 | # IPv4 |
---|
70 | BIN_PROTOCOLS+=eth_0.la |
---|
71 | BIN_PROTOCOLS+=eth_2048.la |
---|
72 | # ARP |
---|
73 | BIN_PROTOCOLS+=eth_2054.la |
---|
74 | # VLAN (802.1Q) |
---|
75 | BIN_PROTOCOLS+=eth_33024.la |
---|
76 | # MPLS |
---|
77 | BIN_PROTOCOLS+=eth_34887.la |
---|
78 | # pppoe |
---|
79 | BIN_PROTOCOLS+=eth_34916.la |
---|
80 | # 802.1x |
---|
81 | BIN_PROTOCOLS+=eth_34958.la |
---|
82 | |
---|
83 | # IPv6 |
---|
84 | BIN_PROTOCOLS+=eth_34525.la |
---|
85 | |
---|
86 | # IP Protocol decoders |
---|
87 | # IPv6 Hop by Hop Options Header |
---|
88 | BIN_PROTOCOLS+=ip_0.la |
---|
89 | # ICMP |
---|
90 | BIN_PROTOCOLS+=ip_1.la |
---|
91 | # TCP |
---|
92 | BIN_PROTOCOLS+=ip_6.la |
---|
93 | # UDP |
---|
94 | BIN_PROTOCOLS+=ip_17.la |
---|
95 | # DCCP |
---|
96 | BIN_PROTOCOLS+=ip_33.la |
---|
97 | # IPv6 Routing Header |
---|
98 | BIN_PROTOCOLS+=ip_43.la |
---|
99 | # IPv6 Fragment Header |
---|
100 | BIN_PROTOCOLS+=ip_44.la |
---|
101 | # GRE |
---|
102 | BIN_PROTOCOLS+=ip_47.la |
---|
103 | # ICMP6 |
---|
104 | TXT_PROTOCOLS+=ip_58.protocol |
---|
105 | # IPv6 Destination Options Header |
---|
106 | BIN_PROTOCOLS+=ip_60.la |
---|
107 | # OSPF |
---|
108 | BIN_PROTOCOLS+=ip_89.la |
---|
109 | # SCTP |
---|
110 | BIN_PROTOCOLS+=ip_132.la |
---|
111 | |
---|
112 | # TCP protocol decoders |
---|
113 | # (tcp_*.la) |
---|
114 | |
---|
115 | # UDP protocol decoders |
---|
116 | # (udp_*.la) |
---|
117 | |
---|
118 | # OSPF decoders |
---|
119 | BIN_PROTOCOLS+=ospf2_1.la |
---|
120 | BIN_PROTOCOLS+=ospf2_4.la |
---|
121 | BIN_PROTOCOLS+=ospf2_5.la |
---|
122 | |
---|
123 | # Start numbering OSPF LSA types from 1000 |
---|
124 | BIN_PROTOCOLS+=ospf2_1000.la |
---|
125 | BIN_PROTOCOLS+=ospf2_1001.la |
---|
126 | BIN_PROTOCOLS+=ospf2_1002.la |
---|
127 | BIN_PROTOCOLS+=ospf2_1003.la |
---|
128 | BIN_PROTOCOLS+=ospf2_1004.la |
---|
129 | BIN_PROTOCOLS+=ospf2_1005.la |
---|
130 | |
---|
131 | # I shouldn't need to do this |
---|
132 | modflags=-module -avoid-version -shared |
---|
133 | link_0_la_LDFLAGS=$(modflags) |
---|
134 | link_1_la_LDFLAGS=$(modflags) |
---|
135 | link_2_la_LDFLAGS=$(modflags) |
---|
136 | link_4_la_LDFLAGS=$(modflags) |
---|
137 | link_6_la_LDFLAGS=$(modflags) |
---|
138 | link_9_la_LDFLAGS=$(modflags) |
---|
139 | link_10_la_LDFLAGS=$(modflags) |
---|
140 | link_11_la_LDFLAGS=$(modflags) |
---|
141 | link_15_la_LDFLAGS=$(modflags) |
---|
142 | if HAVE_WANDDER |
---|
143 | link_22_la_LDFLAGS=$(modflags) |
---|
144 | endif |
---|
145 | eth_0_la_LDFLAGS=$(modflags) |
---|
146 | eth_2048_la_LDFLAGS=$(modflags) |
---|
147 | eth_2054_la_LDFLAGS=$(modflags) |
---|
148 | eth_33024_la_LDFLAGS=$(modflags) |
---|
149 | eth_34887_la_LDFLAGS=$(modflags) |
---|
150 | eth_34916_la_LDFLAGS=$(modflags) |
---|
151 | eth_34958_la_LDFLAGS=$(modflags) |
---|
152 | eth_34525_la_LDFLAGS=$(modflags) |
---|
153 | |
---|
154 | ip_0_la_LDFLAGS=$(modflags) |
---|
155 | ip_1_la_LDFLAGS=$(modflags) |
---|
156 | ip_6_la_LDFLAGS=$(modflags) |
---|
157 | ip_17_la_LDFLAGS=$(modflags) |
---|
158 | ip_33_la_LDFLAGS=$(modflags) |
---|
159 | ip_43_la_LDFLAGS=$(modflags) |
---|
160 | ip_44_la_LDFLAGS=$(modflags) |
---|
161 | ip_47_la_LDFLAGS=$(modflags) |
---|
162 | ip_60_la_LDFLAGS=$(modflags) |
---|
163 | ip_89_la_LDFLAGS=$(modflags) |
---|
164 | ip_132_la_LDFLAGS=$(modflags) |
---|
165 | |
---|
166 | ospf2_1_la_LDFLAGS=$(modflags) |
---|
167 | ospf2_4_la_LDFLAGS=$(modflags) |
---|
168 | ospf2_5_la_LDFLAGS=$(modflags) |
---|
169 | ospf2_1000_la_LDFLAGS=$(modflags) |
---|
170 | ospf2_1001_la_LDFLAGS=$(modflags) |
---|
171 | ospf2_1002_la_LDFLAGS=$(modflags) |
---|
172 | ospf2_1003_la_LDFLAGS=$(modflags) |
---|
173 | ospf2_1004_la_LDFLAGS=$(modflags) |
---|
174 | ospf2_1005_la_LDFLAGS=$(modflags) |
---|
175 | |
---|
176 | libpacketdump_la_SOURCES = libpacketdump.cc ../lib/byteswap.c \ |
---|
177 | lexer.l parser.y bitbuffer.c bitbuffer.h grammar.h |
---|
178 | |
---|
179 | plugin_LTLIBRARIES = $(BIN_PROTOCOLS) |
---|
180 | dist_plugin_DATA = $(TXT_PROTOCOLS) |
---|
181 | |
---|
182 | AM_CPPFLAGS= @ADD_INCLS@ -I../lib |
---|
183 | |
---|
184 | # NOTE: You CANNOT add @LEXLIBS@ here, as they are statically compiled |
---|
185 | # which on non x86_32 platforms means that they cannot be linked into |
---|
186 | # a shared library. |
---|
187 | libpacketdump_la_LIBADD = @LIBPKTDUMP_LIBS@ |
---|
188 | libpacketdump_la_LDFLAGS=\ |
---|
189 | -version-info @LIBTRACE_MAJOR@:@LIBTRACE_MINOR@:@LIBTRACE_MID@ \ |
---|
190 | @ADD_LDFLAGS@ |
---|
191 | |
---|
192 | AM_CXXFLAGS=-g -Wall -DDIRNAME=\"$(plugindir)\" $(AM_CPPFLAGS) |
---|
193 | BUILT_SOURCES=parser.h |
---|
194 | AM_YFLAGS=-d |
---|
195 | EXTRA_DIST=lexer.l parser.y |
---|
196 | |
---|
197 | install-exec-hook: |
---|
198 | $(AM_V_GEN)mkdir -p $(DESTDIR)$(plugindir) |
---|
199 | $(AM_V_GEN)cd $(DESTDIR)$(plugindir) && $(LN_S) -f eth_2048.so ppp_33.so |
---|
200 | $(AM_V_GEN)cd $(DESTDIR)$(plugindir) && $(LN_S) -f eth_2048.so link_5.so |
---|
201 | $(AM_V_GEN)cd $(DESTDIR)$(plugindir) && $(LN_S) -f eth_34525.so ip_41.so |
---|
202 | |
---|
203 | install-data-hook: |
---|
204 | rm -f $(DESTDIR)$(plugindir)/*.la |
---|