Incorporate plugin dissector into build in collection.
[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
38 SUBDIRS = crypt ftypes dfilter dissectors $(wslua_dir)
39
40 DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
41
42 ACLOCAL_AMFLAGS = `../aclocal-flags`
43
44 noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la
45 lib_LTLIBRARIES = libwireshark.la
46 libwireshark_la_LDFLAGS = -version-info 0:1:0 @LDFLAGS_SHAREDLIB@
47
48 include Makefile.common
49
50 INCLUDES = -I$(srcdir)/.. -I$(srcdir)/$(LEMON) @LUA_INCLUDES@ \
51         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) \
52         $(LIBGEOIP_CFLAGS)
53
54
55 if HAVE_WARNINGS_AS_ERRORS
56 AM_NON_GENERATED_CFLAGS = -Werror
57 endif
58
59 #Since code generated by lex may trigger gcc warnings, we are now generating two
60 #libraries.  A single library is generated with the lex code without the barrier
61 #"stop on warning". An other library is generated from the remaining source
62 #files with the "stop on warning" barrier.
63 libwireshark_la_SOURCES = \
64         $(LIBWIRESHARK_SRC)     \
65         $(LIBWIRESHARK_INCLUDES)
66 libwireshark_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
67
68 libwireshark_generated_la_SOURCES = \
69         $(LIBWIRESHARK_GENERATED_SRC) \
70         $(LIBWIRESHARK_GENERATED_INCLUDES)
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_libwireshark_la_SOURCES = \
80         inet_aton.c             \
81         inet_aton.h
82
83 EXTRA_DIST = \
84         diam_dict.l             \
85         dtd_grammar.lemon       \
86         dtd_parse.l             \
87         dtd_parse.h             \
88         dtd_preparse.l          \
89         enterprise-numbers      \
90         libwireshark.def        \
91         Makefile.common         \
92         Makefile.nmake          \
93         make-sminmpec.pl        \
94         radius_dict.l           \
95         tvbtest.c               \
96         reassemble_test.c       \
97         uat_load.l              \
98         exntest.c               \
99         doxygen.cfg.in
100
101 CLEANFILES = \
102         libwireshark.a                  \
103         libwireshark.la                 \
104         libwireshark_generated.a        \
105         libwireshark_generated.la       \
106         libwireshark_asmopt.a           \
107         libwireshark_asmopt.la          \
108         inet_ntop.c                     \
109         inet_pton.c                     \
110         *~
111
112 DISTCLEANFILES = \
113         $(LIBWIRESHARK_DISTCLEAN_GENERATED_SRC) \
114         $(LIBWIRESHARK_DISTCLEAN_GENERATED_INCLUDES) \
115         dtd_grammar.out
116
117 MAINTAINERCLEANFILES = \
118         $(LIBWIRESHARK_NODISTCLEAN_GENERATED_SRC) \
119         $(LIBWIRESHARK_NODISTCLEAN_GENERATED_INCLUDES) \
120         Makefile.in             \
121         sminmpec.c
122
123 #
124 # Add the object files for missing routines, if any.
125 #
126 libwireshark_la_LIBADD = \
127         @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la \
128         libwireshark_asmopt.la crypt/libairpdcap.la ftypes/libftypes.la \
129         dfilter/libdfilter.la dissectors/libdissectors.la \
130         dissectors/libdirtydissectors.la $(wslua_lib) @SOCKET_LIBS@ @NSL_LIBS@ \
131         @C_ARES_LIBS@ @ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ \
132         @KRB5_LIBS@ @SSL_LIBS@ @LIBSMI_LDFLAGS@ @GEOIP_LIBS@ \
133         ${top_builddir}/wsutil/libwsutil.la -lm
134
135 libwireshark_la_DEPENDENCIES = \
136         @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la \
137         libwireshark_asmopt.la crypt/libairpdcap.la ftypes/libftypes.la \
138         dfilter/libdfilter.la dissectors/libdissectors.la \
139         dissectors/libdirtydissectors.la $(wslua_lib) \
140         ${top_builddir}/wsutil/libwsutil.la
141
142 #EXTRA_PROGRAMS = reassemble_test
143 #reassemble_test_LDADD = $(GLIB_LIBS)
144
145 reassemble_test: reassemble_test.o tvbuff.o except.o strutil.o emem.o \
146                  reassemble.o
147         $(LINK) $^ $(GLIB_LIBS) -lz
148
149 tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o
150         $(LINK) $^ $(GLIB_LIBS) -lz
151
152 exntest: exntest.o except.o
153         $(LINK) $^ $(GLIB_LIBS)
154
155 RUNLEX=$(top_srcdir)/tools/runlex.sh
156
157 diam_dict_lex.h: diam_dict.c
158
159 dtd_parse_lex.h: dtd_parse.c
160
161 dtd_preparse_lex.h: dtd_preparse.c
162
163 radius_dict_lex.h: radius_dict.c
164
165 uat_load_lex.h: uat_load.c
166
167 LEMON=../tools/lemon
168
169 dtd_grammar.h: dtd_grammar.c
170
171 dtd_grammar.c: $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
172         $(LEMON)/lemon$(EXEEXT) t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
173
174 tvbtest.o exntest.o: exceptions.h
175
176 sminmpec.c: enterprise-numbers make-sminmpec.pl
177         $(PERL) $(srcdir)/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
178
179 inet_ntop.c:
180         ln -s $(srcdir)/../inet_ntop.c .
181
182 inet_pton.c:
183         ln -s $(srcdir)/../inet_pton.c .
184
185 if HAVE_PLUGINS
186
187 if ENABLE_STATIC
188 -include ../plugins/Custom.make
189 plugin_src = \
190         ../plugins/asn1/packet-asn1.c \
191         ../plugins/docsis/packet-bpkmattr.c \
192         ../plugins/docsis/packet-bpkmreq.c \
193         ../plugins/docsis/packet-bpkmrsp.c \
194         ../plugins/docsis/packet-docsis.c \
195         ../plugins/docsis/packet-dsaack.c \
196         ../plugins/docsis/packet-dsareq.c \
197         ../plugins/docsis/packet-dsarsp.c \
198         ../plugins/docsis/packet-dscack.c \
199         ../plugins/docsis/packet-dscreq.c \
200         ../plugins/docsis/packet-dscrsp.c \
201         ../plugins/docsis/packet-dsdreq.c \
202         ../plugins/docsis/packet-dsdrsp.c \
203         ../plugins/docsis/packet-intrngreq.c \
204         ../plugins/docsis/packet-macmgmt.c \
205         ../plugins/docsis/packet-map.c \
206         ../plugins/docsis/packet-regack.c \
207         ../plugins/docsis/packet-regreq.c \
208         ../plugins/docsis/packet-regrsp.c \
209         ../plugins/docsis/packet-rngreq.c \
210         ../plugins/docsis/packet-rngrsp.c \
211         ../plugins/docsis/packet-tlv.c \
212         ../plugins/docsis/packet-type29ucd.c \
213         ../plugins/docsis/packet-uccreq.c \
214         ../plugins/docsis/packet-uccrsp.c \
215         ../plugins/docsis/packet-ucd.c \
216         ../plugins/giop/packet-cosnaming.c \
217         ../plugins/giop/packet-coseventcomm.c \
218         ../plugins/gryphon/packet-gryphon.c \
219         ../plugins/irda/packet-irda.c \
220         ../plugins/m2m/packet-m2m.c \
221         ../plugins/m2m/wimax_tlv.c \
222         ../plugins/mgcp/packet-mgcp.c \
223         ../plugins/rdm/packet-rdm.c \
224         ../plugins/sercosiii/packet-sercosiii_1v1_at.c \
225         ../plugins/sercosiii/packet-sercosiii_1v1_at_devstat.c \
226         ../plugins/sercosiii/packet-sercosiii_1v1.c \
227         ../plugins/sercosiii/packet-sercosiii_1v1_hp.c \
228         ../plugins/sercosiii/packet-sercosiii_1v1_mdt.c \
229         ../plugins/sercosiii/packet-sercosiii_1v1_mdt_devctrl.c \
230         ../plugins/sercosiii/packet-sercosiii_1v1_mst.c \
231         ../plugins/sercosiii/packet-sercosiii_1v1_svc.c \
232         ../plugins/wimax/crc.c \
233         ../plugins/wimax/crc_data.c \
234         ../plugins/wimax/mac_hd_generic_decoder.c \
235         ../plugins/wimax/mac_hd_type1_decoder.c \
236         ../plugins/wimax/mac_hd_type2_decoder.c \
237         ../plugins/wimax/mac_mgmt_msg_decoder.c \
238         ../plugins/wimax/msg_aas_beam.c \
239         ../plugins/wimax/msg_aas_fbck.c \
240         ../plugins/wimax/msg_arq.c \
241         ../plugins/wimax/msg_clk_cmp.c \
242         ../plugins/wimax/msg_dcd.c \
243         ../plugins/wimax/msg_dlmap.c \
244         ../plugins/wimax/msg_dreg.c \
245         ../plugins/wimax/msg_dsa.c \
246         ../plugins/wimax/msg_dsc.c \
247         ../plugins/wimax/msg_dsd.c \
248         ../plugins/wimax/msg_dsx_rvd.c \
249         ../plugins/wimax/msg_fpc.c \
250         ../plugins/wimax/msg_pkm.c \
251         ../plugins/wimax/msg_pmc.c \
252         ../plugins/wimax/msg_prc_lt_ctrl.c \
253         ../plugins/wimax/msg_reg_req.c \
254         ../plugins/wimax/msg_reg_rsp.c \
255         ../plugins/wimax/msg_rep.c \
256         ../plugins/wimax/msg_res_cmd.c \
257         ../plugins/wimax/msg_rng_req.c \
258         ../plugins/wimax/msg_rng_rsp.c \
259         ../plugins/wimax/msg_sbc.c \
260         ../plugins/wimax/msg_ucd.c \
261         ../plugins/wimax/msg_ulmap.c \
262         ../plugins/wimax/packet-wmx.c \
263         ../plugins/wimax/wimax_cdma_code_decoder.c \
264         ../plugins/wimax/wimax_compact_dlmap_ie_decoder.c \
265         ../plugins/wimax/wimax_compact_ulmap_ie_decoder.c \
266         ../plugins/wimax/wimax_fch_decoder.c \
267         ../plugins/wimax/wimax_ffb_decoder.c \
268         ../plugins/wimax/wimax_hack_decoder.c \
269         ../plugins/wimax/wimax_harq_map_decoder.c \
270         ../plugins/wimax/wimax_pdu_decoder.c \
271         ../plugins/wimax/wimax_phy_attributes_decoder.c \
272         ../plugins/wimax/wimax_tlv.c \
273         ../plugins/wimax/wimax_utils.c
274
275
276 else            # ENABLE_STATIC
277
278 plugin_src =
279
280 endif           # ENABLE_STATIC
281
282 else            # HAVE_PLUGINS
283 plugin_src =
284
285 endif           # HAVE_PLUGINS
286
287 doxygen:
288 if HAVE_DOXYGEN
289         $(DOXYGEN) doxygen.cfg
290 endif           # HAVE_DOXYGEN
291
292 checkapi:
293         $(PERL) ../tools/checkAPIs.pl -g termoutput $(LIBWIRESHARK_SRC)