7d9f8e799b577665f372c4683870adffc1e9097c
[obnox/wireshark/wip.git] / epan / Makefile.am
1 # Makefile.am
2 # Automake file for the EPAN library
3 # (Ethereal Protocol ANalyzer Library)
4 #
5 # $Id$
6 #
7 # Wireshark - Network traffic analyzer
8 # By Gerald Combs <gerald@wireshark.org>
9 # Copyright 1998 Gerald Combs
10 #
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24
25 include ../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 if HAVE_LIBPY
38 wspython_lib = wspython/libwspython.la
39 wspython_dir = wspython
40 wspython_dist_dir =
41 py_dissectors_dir = -DPYTHON_DIR=\"@pythondir@\"
42 else
43 wspython_lib =
44 wspython_dir =
45 wspython_dist_dir = wspython
46 py_dissectors_dir = -DPYTHONDIR=
47 endif
48
49 SUBDIRS = crc crypt ftypes dfilter dissectors $(wslua_dir) $(wspython_dir)
50
51 DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir) $(wspython_dist_dir)
52
53 ACLOCAL_AMFLAGS = `../aclocal-flags`
54
55 noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la
56 lib_LTLIBRARIES = libwireshark.la
57 libwireshark_la_LDFLAGS = -version-info 0:1:0 @LDFLAGS_SHAREDLIB@
58
59 include Makefile.common
60
61 INCLUDES = -I$(srcdir)/.. -I$(srcdir)/$(LEMON) @LUA_INCLUDES@ \
62         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) \
63         $(LIBGEOIP_CFLAGS)
64
65
66 if HAVE_WARNINGS_AS_ERRORS
67 AM_NON_GENERATED_CFLAGS = -Werror
68 endif
69
70 #Since code generated by lex may trigger gcc warnings, we are now generating two
71 #libraries.  A single library is generated with the lex code without the barrier
72 #"stop on warning". An other library is generated from the remaining source
73 #files with the "stop on warning" barrier.
74 libwireshark_la_SOURCES = \
75         $(LIBWIRESHARK_SRC)     \
76         $(LIBWIRESHARK_INCLUDES)
77 libwireshark_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS) $(py_dissectors_dir)
78
79 libwireshark_generated_la_SOURCES = \
80         $(LIBWIRESHARK_GENERATED_SRC) \
81         $(LIBWIRESHARK_GENERATED_INCLUDES)
82
83 # code optionally implemented in assembler
84 # only C source available for platforms other than Win32
85 libwireshark_asmopt_la_SOURCES = \
86         asm_utils.c             \
87         asm_utils.h             \
88         asm_utils_win32_x86.asm
89
90 EXTRA_libwireshark_la_SOURCES = \
91         inet_aton.c             \
92         inet_aton.h
93
94 EXTRA_DIST = \
95         diam_dict.l             \
96         dtd_grammar.lemon       \
97         dtd_parse.l             \
98         dtd_parse.h             \
99         dtd_preparse.l          \
100         enterprise-numbers      \
101         libwireshark.def        \
102         Makefile.common         \
103         Makefile.nmake          \
104         radius_dict.l           \
105         tvbtest.c               \
106         reassemble_test.c       \
107         uat_load.l              \
108         exntest.c               \
109         doxygen.cfg.in
110
111 CLEANFILES = \
112         libwireshark.a                  \
113         libwireshark.la                 \
114         libwireshark_generated.a        \
115         libwireshark_generated.la       \
116         libwireshark_asmopt.a           \
117         libwireshark_asmopt.la          \
118         inet_ntop.c                     \
119         inet_pton.c                     \
120         *~
121
122 DISTCLEANFILES = \
123         $(LIBWIRESHARK_DISTCLEAN_GENERATED_SRC) \
124         $(LIBWIRESHARK_DISTCLEAN_GENERATED_INCLUDES) \
125         dtd_grammar.out
126
127 MAINTAINERCLEANFILES = \
128         $(LIBWIRESHARK_NODISTCLEAN_GENERATED_SRC) \
129         $(LIBWIRESHARK_NODISTCLEAN_GENERATED_INCLUDES) \
130         Makefile.in             \
131         sminmpec.c
132
133 #
134 # Add the object files for missing routines, if any.
135 #
136 libwireshark_la_LIBADD = \
137         @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la \
138         libwireshark_asmopt.la crc/libcrc.la crypt/libairpdcap.la \
139         ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \
140         dissectors/libdirtydissectors.la $(wslua_lib) $(wspython_lib) @SOCKET_LIBS@ @NSL_LIBS@ \
141         @C_ARES_LIBS@ @ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ \
142         @KRB5_LIBS@ @SSL_LIBS@ @LIBSMI_LDFLAGS@ @GEOIP_LIBS@ \
143         ${top_builddir}/wiretap/libwiretap.la @GLIB_LIBS@ \
144         ${top_builddir}/wsutil/libwsutil.la -lm
145
146 libwireshark_la_DEPENDENCIES = \
147         @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la \
148         libwireshark_asmopt.la crc/libcrc.la crypt/libairpdcap.la \
149         ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \
150         dissectors/libdirtydissectors.la $(wslua_lib) $(wspython_lib) \
151         ${top_builddir}/wsutil/libwsutil.la \
152         ${top_builddir}/wiretap/libwiretap.la
153
154 #EXTRA_PROGRAMS = reassemble_test
155 #reassemble_test_LDADD = $(GLIB_LIBS)
156
157 reassemble_test: reassemble_test.o tvbuff.o except.o to_str.o strutil.o emem.o \
158                  reassemble.o
159         $(LINK) $^ $(GLIB_LIBS) -lz
160
161 tvbtest: tvbtest.o tvbuff.o except.o to_str.o strutil.o emem.o
162         $(LINK) $^ $(GLIB_LIBS) -lz
163
164 exntest: exntest.o except.o
165         $(LINK) $^ $(GLIB_LIBS)
166
167 RUNLEX=$(top_srcdir)/tools/runlex.sh
168
169 diam_dict_lex.h: diam_dict.c
170
171 dtd_parse_lex.h: dtd_parse.c
172
173 dtd_preparse_lex.h: dtd_preparse.c
174
175 radius_dict_lex.h: radius_dict.c
176
177 uat_load_lex.h: uat_load.c
178
179 LEMON=../tools/lemon
180
181 dtd_grammar.h: dtd_grammar.c
182
183 dtd_grammar.c: $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
184         $(LEMON)/lemon$(EXEEXT) t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
185
186 tvbtest.o exntest.o: exceptions.h
187
188 sminmpec.c: enterprise-numbers ../tools/make-sminmpec.pl
189         $(PERL) $(srcdir)/../tools/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
190
191 inet_ntop.c:
192         ln -s $(srcdir)/../inet_ntop.c .
193
194 inet_pton.c:
195         ln -s $(srcdir)/../inet_pton.c .
196
197 if HAVE_PLUGINS
198
199 if ENABLE_STATIC
200 -include ../plugins/Custom.make
201 plugin_src = \
202         ../plugins/asn1/packet-asn1.c \
203         ../plugins/docsis/packet-bintrngreq.c \
204         ../plugins/docsis/packet-bpkmattr.c \
205         ../plugins/docsis/packet-bpkmreq.c \
206         ../plugins/docsis/packet-bpkmrsp.c \
207         ../plugins/docsis/packet-docsis.c \
208         ../plugins/docsis/packet-dsaack.c \
209         ../plugins/docsis/packet-dsareq.c \
210         ../plugins/docsis/packet-dsarsp.c \
211         ../plugins/docsis/packet-dscack.c \
212         ../plugins/docsis/packet-dscreq.c \
213         ../plugins/docsis/packet-dscrsp.c \
214         ../plugins/docsis/packet-dsdreq.c \
215         ../plugins/docsis/packet-dsdrsp.c \
216         ../plugins/docsis/packet-intrngreq.c \
217         ../plugins/docsis/packet-macmgmt.c \
218         ../plugins/docsis/packet-map.c \
219         ../plugins/docsis/packet-regack.c \
220         ../plugins/docsis/packet-regreq.c \
221         ../plugins/docsis/packet-regrsp.c \
222         ../plugins/docsis/packet-rngreq.c \
223         ../plugins/docsis/packet-rngrsp.c \
224         ../plugins/docsis/packet-tlv.c \
225         ../plugins/docsis/packet-type29ucd.c \
226         ../plugins/docsis/packet-uccreq.c \
227         ../plugins/docsis/packet-uccrsp.c \
228         ../plugins/docsis/packet-ucd.c \
229         ../plugins/giop/packet-cosnaming.c \
230         ../plugins/giop/packet-coseventcomm.c \
231         ../plugins/gryphon/packet-gryphon.c \
232         ../plugins/interlink/packet-interlink.c \
233         ../plugins/irda/packet-irda.c \
234         ../plugins/m2m/packet-m2m.c \
235         ../plugins/m2m/wimax_tlv.c \
236         ../plugins/mgcp/packet-mgcp.c \
237         ../plugins/rdm/packet-rdm.c \
238         ../plugins/sercosiii/packet-sercosiii_1v1_at.c \
239         ../plugins/sercosiii/packet-sercosiii_1v1_at_devstat.c \
240         ../plugins/sercosiii/packet-sercosiii_1v1.c \
241         ../plugins/sercosiii/packet-sercosiii_1v1_hp.c \
242         ../plugins/sercosiii/packet-sercosiii_1v1_mdt.c \
243         ../plugins/sercosiii/packet-sercosiii_1v1_mdt_devctrl.c \
244         ../plugins/sercosiii/packet-sercosiii_1v1_mst.c \
245         ../plugins/sercosiii/packet-sercosiii_1v1_svc.c \
246         ../plugins/wimax/crc.c \
247         ../plugins/wimax/crc_data.c \
248         ../plugins/wimax/mac_hd_generic_decoder.c \
249         ../plugins/wimax/mac_hd_type1_decoder.c \
250         ../plugins/wimax/mac_hd_type2_decoder.c \
251         ../plugins/wimax/mac_mgmt_msg_decoder.c \
252         ../plugins/wimax/msg_aas_beam.c \
253         ../plugins/wimax/msg_aas_fbck.c \
254         ../plugins/wimax/msg_arq.c \
255         ../plugins/wimax/msg_clk_cmp.c \
256         ../plugins/wimax/msg_dcd.c \
257         ../plugins/wimax/msg_dlmap.c \
258         ../plugins/wimax/msg_dreg.c \
259         ../plugins/wimax/msg_dsa.c \
260         ../plugins/wimax/msg_dsc.c \
261         ../plugins/wimax/msg_dsd.c \
262         ../plugins/wimax/msg_dsx_rvd.c \
263         ../plugins/wimax/msg_fpc.c \
264         ../plugins/wimax/msg_pkm.c \
265         ../plugins/wimax/msg_pmc.c \
266         ../plugins/wimax/msg_prc_lt_ctrl.c \
267         ../plugins/wimax/msg_reg_req.c \
268         ../plugins/wimax/msg_reg_rsp.c \
269         ../plugins/wimax/msg_rep.c \
270         ../plugins/wimax/msg_res_cmd.c \
271         ../plugins/wimax/msg_rng_req.c \
272         ../plugins/wimax/msg_rng_rsp.c \
273         ../plugins/wimax/msg_sbc.c \
274         ../plugins/wimax/msg_ucd.c \
275         ../plugins/wimax/msg_ulmap.c \
276         ../plugins/wimax/packet-wmx.c \
277         ../plugins/wimax/wimax_cdma_code_decoder.c \
278         ../plugins/wimax/wimax_compact_dlmap_ie_decoder.c \
279         ../plugins/wimax/wimax_compact_ulmap_ie_decoder.c \
280         ../plugins/wimax/wimax_fch_decoder.c \
281         ../plugins/wimax/wimax_ffb_decoder.c \
282         ../plugins/wimax/wimax_hack_decoder.c \
283         ../plugins/wimax/wimax_harq_map_decoder.c \
284         ../plugins/wimax/wimax_pdu_decoder.c \
285         ../plugins/wimax/wimax_phy_attributes_decoder.c \
286         ../plugins/wimax/wimax_tlv.c \
287         ../plugins/wimax/wimax_utils.c
288
289
290 else            # ENABLE_STATIC
291
292 plugin_src =
293
294 endif           # ENABLE_STATIC
295
296 else            # HAVE_PLUGINS
297 plugin_src =
298
299 endif           # HAVE_PLUGINS
300
301 doxygen:
302 if HAVE_DOXYGEN
303         $(DOXYGEN) doxygen.cfg
304 endif           # HAVE_DOXYGEN
305
306 checkapi:
307         $(PERL) ../tools/checkAPIs.pl -g termoutput $(LIBWIRESHARK_SRC)