autotools: Add automake silent rule for ln -s
[metze/wireshark/wip.git] / epan / Makefile.am
1 # Makefile.am
2 # Automake file for the libwireshark library
3 # (EPAN is a historical name; it stands for Ethereal Protocol ANalyzer
4 # Library)
5 #
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 1998 Gerald Combs
9 #
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23
24 include Makefile.common
25 include $(top_srcdir)/Makefile.am.inc
26
27 if HAVE_LIBLUA
28 wslua_lib = wslua/libwslua.la
29 wslua_dir = wslua
30 wslua_dist_dir =
31 else            # HAVE_LIBLUA
32 wslua_lib =
33 wslua_dir =
34 wslua_dist_dir = wslua
35 endif           # HAVE_LIBLUA
36
37 SUBDIRS = compress crypt ftypes dfilter dissectors nghttp2 wmem $(wslua_dir)
38
39 DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
40
41 AM_CPPFLAGS = $(INCLUDEDIRS) -I$(builddir)/wslua $(WS_CPPFLAGS) \
42         $(GLIB_CFLAGS) $(LUA_CFLAGS) $(LIBGNUTLS_CFLAGS) \
43         $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) \
44         $(KRB5_CFLAGS)
45
46 noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la
47 lib_LTLIBRARIES = libwireshark.la
48 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
49 libwireshark_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
50
51 #Since code generated by lex may trigger gcc warnings, we are now generating two
52 #libraries. A single library is generated with the lex code without the barrier
53 #"stop on warning". An other library is generated from the remaining source
54 #files with the "stop on warning" barrier.
55 libwireshark_la_SOURCES = \
56         $(LIBWIRESHARK_SRC)     \
57         $(LIBWIRESHARK_INCLUDES)        \
58         ws_version_info.c
59
60 libwireshark_la_CPPFLAGS = $(AM_CPPFLAGS) -DWS_BUILD_DLL
61
62 libwireshark_generated_la_SOURCES = \
63         $(LIBWIRESHARK_GENERATED_C_FILES) \
64         $(LIBWIRESHARK_GENERATED_HEADER_FILES)
65
66 libwireshark_generated_la_CFLAGS = $(GENERATED_CFLAGS)
67
68 nodist_libwireshark_generated_la_SOURCES = \
69         $(NODIST_LIBWIRESHARK_GENERATED_C_FILES) \
70         $(NODIST_LIBWIRESHARK_GENERATED_HEADER_FILES)
71
72 # code optionally implemented in assembler
73 # only C source available for platforms other than Win32
74 libwireshark_asmopt_la_SOURCES = \
75         asm_utils.c             \
76         asm_utils.h             \
77         asm_utils_win32_x86.asm
78
79 EXTRA_DIST = \
80         .editorconfig           \
81         diam_dict.l             \
82         dtd_grammar.lemon       \
83         dtd_parse.l             \
84         dtd_parse.h             \
85         dtd_preparse.l          \
86         enterprise-numbers      \
87         Makefile.common         \
88         Makefile.nmake          \
89         radius_dict.l           \
90         uat_load.l              \
91         doxygen.cfg.in          \
92         CMakeLists.txt          \
93         print.ps
94
95 CLEANFILES = \
96         doxygen-epan.tag                \
97         libwireshark.a                  \
98         libwireshark.la                 \
99         libwireshark_generated.a        \
100         libwireshark_generated.la       \
101         libwireshark_asmopt.a           \
102         libwireshark_asmopt.la          \
103         *~
104
105 DISTCLEANFILES = \
106         $(NODIST_LIBWIRESHARK_GENERATED_C_FILES) \
107         $(NODIST_LIBWIRESHARK_GENERATED_HEADER_FILES) \
108         dtd_grammar.out \
109         ws_version_info.c
110
111 MAINTAINERCLEANFILES = \
112         $(LIBWIRESHARK_GENERATED_C_FILES) \
113         $(LIBWIRESHARK_GENERATED_HEADER_FILES) \
114         Makefile.in
115
116 BUILT_SOURCES = \
117         $(LIBWIRESHARK_GENERATED_HEADER_FILES) \
118         $(NODIST_LIBWIRESHARK_GENERATED_HEADER_FILES) \
119         ws_version_info.c
120
121 #
122 # Add the object files for missing routines, if any.
123 #
124 libwireshark_la_LIBADD = \
125         libwireshark_generated.la               \
126         libwireshark_asmopt.la                  \
127         crypt/libairpdcap.la                    \
128         ftypes/libftypes.la                     \
129         dfilter/libdfilter.la                   \
130         dissectors/libdissectors.la             \
131         dissectors/libdirtydissectors.la        \
132         dissectors/libfiledissectors.la         \
133         nghttp2/libnghttp2.la                   \
134         wmem/libwmem.la                         \
135         $(wslua_lib)                            \
136         ${top_builddir}/wiretap/libwiretap.la   \
137         ${top_builddir}/wsutil/libwsutil.la     \
138         @C_ARES_LIBS@           \
139         @LIBGCRYPT_LIBS@        \
140         @LIBGNUTLS_LIBS@        \
141         @KRB5_LIBS@             \
142         @SSL_LIBS@              \
143         @LIBSMI_LDFLAGS@        \
144         @GEOIP_LIBS@            \
145         @GLIB_LIBS@
146
147 libwireshark_la_DEPENDENCIES = \
148         libwireshark_generated.la               \
149         compress/liblzxpress.la                 \
150         libwireshark_asmopt.la                  \
151         crypt/libairpdcap.la                    \
152         ftypes/libftypes.la                     \
153         dfilter/libdfilter.la                   \
154         dissectors/libdissectors.la             \
155         dissectors/libdirtydissectors.la        \
156         nghttp2/libnghttp2.la                   \
157         wmem/libwmem.la                         \
158         $(wslua_lib)                            \
159         ${top_builddir}/wsutil/libwsutil.la     \
160         ${top_builddir}/wiretap/libwiretap.la
161
162 EXTRA_PROGRAMS = reassemble_test tvbtest oids_test exntest
163
164 reassemble_test_LDADD = \
165         libwireshark.la \
166         $(GLIB_LIBS) \
167         -lz
168
169 tvbtest_LDADD = \
170         libwireshark.la \
171         $(GLIB_LIBS) \
172         -lz
173
174 oids_test_LDADD = \
175         libwireshark.la \
176         $(GLIB_LIBS) \
177         -lz
178
179 exntest_SOURCES = exntest.c except.c
180
181 exntest_LDADD = $(GLIB_LIBS)
182
183 test-programs: $(EXTRA_PROGRAMS)
184         $(MAKE) -C wmem $@
185
186 diam_dict_lex.h: diam_dict.c
187
188 dtd_parse_lex.h: dtd_parse.c
189
190 dtd_preparse_lex.h: dtd_preparse.c
191
192 radius_dict_lex.h: radius_dict.c
193
194 uat_load_lex.h: uat_load.c
195
196 dtd_grammar.h: dtd_grammar.c
197 dtd_grammar.c : $(LEMON) $(lemon_srcdir)/lempar.c $(srcdir)/dtd_grammar.lemon
198         $(AM_V_LEMON)$(LEMON) T=$(lemon_srcdir)/lempar.c $(srcdir)/dtd_grammar.lemon
199
200 ws_version_info.c: $(top_srcdir)/ws_version_info.c
201         $(AM_V_LN_S)$(LN_S) $<
202
203 tvbtest.o exntest.o oids_test.o: exceptions.h
204
205 update-sminmpec:
206         $(PERL) $(srcdir)/../tools/make-sminmpec.pl
207
208 ps.c: print.ps $(top_srcdir)/tools/rdps.py
209         $(AM_V_python)$(PYTHON) $(top_srcdir)/tools/rdps.py $(srcdir)/print.ps ps.c
210
211 if HAVE_PLUGINS
212
213 if ENABLE_STATIC
214 -include ../plugins/Custom.make
215 plugin_src = \
216         ../plugins/asn1/packet-asn1.c \
217         ../plugins/docsis/packet-bintrngreq.c \
218         ../plugins/docsis/packet-bpkmattr.c \
219         ../plugins/docsis/packet-bpkmreq.c \
220         ../plugins/docsis/packet-bpkmrsp.c \
221         ../plugins/docsis/packet-docsis.c \
222         ../plugins/docsis/packet-dsaack.c \
223         ../plugins/docsis/packet-dsareq.c \
224         ../plugins/docsis/packet-dsarsp.c \
225         ../plugins/docsis/packet-dscack.c \
226         ../plugins/docsis/packet-dscreq.c \
227         ../plugins/docsis/packet-dscrsp.c \
228         ../plugins/docsis/packet-dsdreq.c \
229         ../plugins/docsis/packet-dsdrsp.c \
230         ../plugins/docsis/packet-intrngreq.c \
231         ../plugins/docsis/packet-macmgmt.c \
232         ../plugins/docsis/packet-map.c \
233         ../plugins/docsis/packet-regack.c \
234         ../plugins/docsis/packet-regreq.c \
235         ../plugins/docsis/packet-regrsp.c \
236         ../plugins/docsis/packet-rngreq.c \
237         ../plugins/docsis/packet-rngrsp.c \
238         ../plugins/docsis/packet-tlv.c \
239         ../plugins/docsis/packet-type29ucd.c \
240         ../plugins/docsis/packet-uccreq.c \
241         ../plugins/docsis/packet-uccrsp.c \
242         ../plugins/docsis/packet-ucd.c \
243         ../plugins/gryphon/packet-gryphon.c \
244         ../plugins/irda/packet-irda.c \
245         ../plugins/m2m/packet-m2m.c \
246         ../plugins/m2m/wimax_tlv.c \
247         ../plugins/wimax/crc.c \
248         ../plugins/wimax/crc_data.c \
249         ../plugins/wimax/mac_hd_generic_decoder.c \
250         ../plugins/wimax/mac_hd_type1_decoder.c \
251         ../plugins/wimax/mac_hd_type2_decoder.c \
252         ../plugins/wimax/mac_mgmt_msg_decoder.c \
253         ../plugins/wimax/msg_aas_beam.c \
254         ../plugins/wimax/msg_aas_fbck.c \
255         ../plugins/wimax/msg_arq.c \
256         ../plugins/wimax/msg_clk_cmp.c \
257         ../plugins/wimax/msg_dcd.c \
258         ../plugins/wimax/msg_dlmap.c \
259         ../plugins/wimax/msg_dreg.c \
260         ../plugins/wimax/msg_dsa.c \
261         ../plugins/wimax/msg_dsc.c \
262         ../plugins/wimax/msg_dsd.c \
263         ../plugins/wimax/msg_dsx_rvd.c \
264         ../plugins/wimax/msg_fpc.c \
265         ../plugins/wimax/msg_pkm.c \
266         ../plugins/wimax/msg_pmc.c \
267         ../plugins/wimax/msg_prc_lt_ctrl.c \
268         ../plugins/wimax/msg_reg_req.c \
269         ../plugins/wimax/msg_reg_rsp.c \
270         ../plugins/wimax/msg_rep.c \
271         ../plugins/wimax/msg_res_cmd.c \
272         ../plugins/wimax/msg_rng_req.c \
273         ../plugins/wimax/msg_rng_rsp.c \
274         ../plugins/wimax/msg_sbc.c \
275         ../plugins/wimax/msg_ucd.c \
276         ../plugins/wimax/msg_ulmap.c \
277         ../plugins/wimax/packet-wmx.c \
278         ../plugins/wimax/wimax_cdma_code_decoder.c \
279         ../plugins/wimax/wimax_compact_dlmap_ie_decoder.c \
280         ../plugins/wimax/wimax_compact_ulmap_ie_decoder.c \
281         ../plugins/wimax/wimax_fch_decoder.c \
282         ../plugins/wimax/wimax_ffb_decoder.c \
283         ../plugins/wimax/wimax_hack_decoder.c \
284         ../plugins/wimax/wimax_harq_map_decoder.c \
285         ../plugins/wimax/wimax_pdu_decoder.c \
286         ../plugins/wimax/wimax_phy_attributes_decoder.c \
287         ../plugins/wimax/wimax_tlv.c \
288         ../plugins/wimax/wimax_utils.c
289
290
291 else            # ENABLE_STATIC
292
293 plugin_src =
294
295 endif           # ENABLE_STATIC
296
297 else            # HAVE_PLUGINS
298 plugin_src =
299
300 endif           # HAVE_PLUGINS
301
302 doxygen:
303 if HAVE_DOXYGEN
304         $(AM_V_GEN)$(DOXYGEN) doxygen.cfg
305 endif           # HAVE_DOXYGEN
306
307 wsar_html: doxygen.cfg ../doxygen_global.cfg
308 if HAVE_DOXYGEN
309         (umask 022 ; $(DOXYGEN) doxygen.cfg)
310 endif
311
312 # ABI compliance checker can be obtained from
313 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
314 # Checked using version 1.21.12
315 dumpabi-libwireshark: all abi-descriptor.xml
316         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
317         mkdir abi-check-headers
318         cp ../config.h ../register.h abi-check-headers/
319         mkdir abi-check-headers/epan
320         cp *.h abi-check-headers/epan
321         mkdir abi-check-headers/crypt
322         cp crypt/*.h abi-check-headers/crypt
323         mkdir abi-check-headers/compress
324         cp compress/*.h abi-check-headers/compress
325         mkdir abi-check-headers/dfilter
326         cp dfilter/*.h ../tools/lemon/cppmagic.h abi-check-headers/dfilter
327         mkdir abi-check-headers/dissectors
328         cp dissectors/*.h abi-check-headers/dissectors
329         rm \
330                 abi-check-headers/dissectors/x11-extension-implementation.h \
331                 abi-check-headers/dissectors/x11-glx-render-enum.h \
332                 abi-check-headers/dissectors/x11-register-info.h \
333                 abi-check-headers/dissectors/packet-idmp.h
334         mkdir abi-check-headers/ftypes
335         cp ftypes/*.h abi-check-headers/ftypes
336         mkdir abi-check-headers/wmem
337         cp wmem/*.h abi-check-headers/wmem
338         abi-compliance-checker -log-path abi_logs/log.txt -l libwireshark -v1 `readlink .libs/libwireshark.so | sed 's/.*\.so\.//'` \
339                 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
340                 cat abi_logs/log.txt logs/libwireshark/[0-9]*/log.txt
341         cp -f abi_dumps/libwireshark/libwireshark_* .libs/
342         cd .libs && ln -sf libwireshark_*.abi.tar.gz libwireshark.abi.tar.gz
343
344 maintainer-clean-local: clean-dumpabi-libwireshark
345
346 .PHONY: clean-dumpabi-libwireshark
347
348 clean-dumpabi-libwireshark:
349         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz abi_logs abi-descriptor.xml
350
351 checkapi:
352         $(AM_V_GEN)$(PERL) $(top_srcdir)/tools/checkAPIs.pl -g termoutput -build \
353         -sourcedir=$(srcdir) \
354         $(LIBWIRESHARK_SRC)