Add a Makefile.am.inc file, to hold rules etc. used by multiple
[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
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)
52
53
54 if HAVE_WARNINGS_AS_ERRORS
55 AM_NON_GENERATED_CFLAGS = -Werror
56 endif
57
58 #Since code generated by lex may trigger gcc warnings, we are now generating two
59 #libraries.  A single library is generated with the lex code without the barrier
60 #"stop on warning". An other library is generated from the remaining source
61 #files with the "stop on warning" barrier.
62 libwireshark_la_SOURCES = \
63         $(LIBWIRESHARK_SRC)     \
64         $(LIBWIRESHARK_INCLUDES)
65 libwireshark_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
66
67 libwireshark_generated_la_SOURCES = \
68         $(LIBWIRESHARK_GENERATED_SRC)
69
70 EXTRA_libwireshark_la_SOURCES = \
71         g_ascii_strtoull.c      \
72         g_ascii_strtoull.h      \
73         inet_aton.c             \
74         inet_aton.h
75
76 EXTRA_DIST = \
77         diam_dict.l             \
78         dtd_grammar.lemon       \
79         dtd_parse.l             \
80         dtd_parse.h             \
81         dtd_preparse.l          \
82         enterprise-numbers      \
83         libwireshark.def        \
84         Makefile.common         \
85         Makefile.nmake          \
86         make-sminmpec.pl        \
87         radius_dict.l           \
88         tvbtest.c               \
89         reassemble_test.c       \
90         uat_load.l              \
91         exntest.c               \
92         doxygen.cfg.in
93
94 CLEANFILES = \
95         libwireshark.a                  \
96         libwireshark.la                 \
97         libwireshark_generated.a        \
98         libwireshark_generated.la       \
99         *~
100
101 DISTCLEANFILES = \
102         $(LIBWIRESHARK_DISTCLEAN_GENERATED_SRC) \
103         dtd_grammar.h           \
104         dtd_grammar.out
105
106 MAINTAINERCLEANFILES = \
107         $(LIBWIRESHARK_NODISTCLEAN_GENERATED_SRC) \
108         Makefile.in             \
109         sminmpec.c
110
111 #
112 # Add the object files for missing routines, if any.
113 #
114 libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SNMP_LIBS@ @SSL_LIBS@ -lm
115 libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib)
116
117 #EXTRA_PROGRAMS = reassemble_test
118 #reassemble_test_LDADD = $(GLIB_LIBS)
119
120 reassemble_test: reassemble_test.o tvbuff.o except.o strutil.o emem.o \
121                  reassemble.o 
122         $(LINK) $^ $(GLIB_LIBS) -lz
123
124 tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o
125         $(LINK) $^ $(GLIB_LIBS) -lz
126
127 exntest: exntest.o except.o
128         $(LINK) $^ $(GLIB_LIBS)
129
130 dtd_grammar.h: dtd_grammar.c
131
132 LEMON=../tools/lemon
133
134 dtd_grammar.c: dtd_grammar.lemon $(LEMON)/lemon$(EXEEXT)
135         $(LEMON)/lemon$(EXEEXT) t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
136         
137 tvbtest.o exntest.o: exceptions.h
138
139 sminmpec.c: enterprise-numbers make-sminmpec.pl
140         $(PERL) $(srcdir)/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
141
142 if HAVE_PLUGINS
143
144 if ENABLE_STATIC
145
146 plugin_src = \
147         ../plugins/artnet/packet-artnet.c \
148         ../plugins/asn1/packet-asn1.c \
149         ../plugins/docsis/packet-bpkmattr.c \
150         ../plugins/docsis/packet-bpkmreq.c \
151         ../plugins/docsis/packet-bpkmrsp.c \
152         ../plugins/docsis/packet-docsis.c \
153         ../plugins/docsis/packet-dsaack.c \
154         ../plugins/docsis/packet-dsareq.c \
155         ../plugins/docsis/packet-dsarsp.c \
156         ../plugins/docsis/packet-dscack.c \
157         ../plugins/docsis/packet-dscreq.c \
158         ../plugins/docsis/packet-dscrsp.c \
159         ../plugins/docsis/packet-dsdreq.c \
160         ../plugins/docsis/packet-dsdrsp.c \
161         ../plugins/docsis/packet-intrngreq.c \
162         ../plugins/docsis/packet-macmgmt.c \
163         ../plugins/docsis/packet-map.c \
164         ../plugins/docsis/packet-regack.c \
165         ../plugins/docsis/packet-regreq.c \
166         ../plugins/docsis/packet-regrsp.c \
167         ../plugins/docsis/packet-rngreq.c \
168         ../plugins/docsis/packet-rngrsp.c \
169         ../plugins/docsis/packet-tlv.c \
170         ../plugins/docsis/packet-type29ucd.c \
171         ../plugins/docsis/packet-uccreq.c \
172         ../plugins/docsis/packet-uccrsp.c \
173         ../plugins/docsis/packet-ucd.c \
174         ../plugins/enttec/packet-enttec.c \
175         ../plugins/giop/packet-cosnaming.c \
176         ../plugins/giop/packet-coseventcomm.c \
177         ../plugins/gryphon/packet-gryphon.c \
178         ../plugins/irda/packet-irda.c \
179         ../plugins/lwres/packet-lwres.c \
180         ../plugins/m2m/packet-m2m.c \
181         ../plugins/m2m/wimax_tlv.c \
182         ../plugins/mgcp/packet-mgcp.c \
183         ../plugins/pcli/packet-pcli.c \
184         ../plugins/rdm/packet-rdm.c \
185         ../plugins/rtnet/packet-rtnet.c \
186         ../plugins/v5ua/packet-v5ua.c \
187         ../plugins/wimax/crc.c \
188         ../plugins/wimax/crc_data.c \
189         ../plugins/wimax/mac_hd_generic_decoder.c \
190         ../plugins/wimax/mac_hd_type1_decoder.c \
191         ../plugins/wimax/mac_hd_type2_decoder.c \
192         ../plugins/wimax/mac_mgmt_msg_decoder.c \
193         ../plugins/wimax/msg_aas_beam.c \
194         ../plugins/wimax/msg_aas_fbck.c \
195         ../plugins/wimax/msg_arq.c \
196         ../plugins/wimax/msg_clk_cmp.c \
197         ../plugins/wimax/msg_dcd.c \
198         ../plugins/wimax/msg_dlmap.c \
199         ../plugins/wimax/msg_dreg.c \
200         ../plugins/wimax/msg_dsa.c \
201         ../plugins/wimax/msg_dsc.c \
202         ../plugins/wimax/msg_dsd.c \
203         ../plugins/wimax/msg_dsx_rvd.c \
204         ../plugins/wimax/msg_fpc.c \
205         ../plugins/wimax/msg_pkm.c \
206         ../plugins/wimax/msg_pmc.c \
207         ../plugins/wimax/msg_prc_lt_ctrl.c \
208         ../plugins/wimax/msg_reg_req.c \
209         ../plugins/wimax/msg_reg_rsp.c \
210         ../plugins/wimax/msg_rep.c \
211         ../plugins/wimax/msg_res_cmd.c \
212         ../plugins/wimax/msg_rng_req.c \
213         ../plugins/wimax/msg_rng_rsp.c \
214         ../plugins/wimax/msg_sbc.c \
215         ../plugins/wimax/msg_ucd.c \
216         ../plugins/wimax/msg_ulmap.c \
217         ../plugins/wimax/packet-wmx.c \
218         ../plugins/wimax/wimax_cdma_code_decoder.c \
219         ../plugins/wimax/wimax_compact_dlmap_ie_decoder.c \
220         ../plugins/wimax/wimax_compact_ulmap_ie_decoder.c \
221         ../plugins/wimax/wimax_fch_decoder.c \
222         ../plugins/wimax/wimax_ffb_decoder.c \
223         ../plugins/wimax/wimax_hack_decoder.c \
224         ../plugins/wimax/wimax_harq_map_decoder.c \
225         ../plugins/wimax/wimax_pdu_decoder.c \
226         ../plugins/wimax/wimax_phy_attributes_decoder.c \
227         ../plugins/wimax/wimax_tlv.c \
228         ../plugins/wimax/wimax_utils.c
229
230
231 else            # ENABLE_STATIC
232
233 plugin_src =
234
235 endif           # ENABLE_STATIC
236
237 else            # HAVE_PLUGINS
238 plugin_src =
239
240 endif           # HAVE_PLUGINS
241
242 doxygen:
243 if HAVE_DOXYGEN
244         $(DOXYGEN) doxygen.cfg
245 endif           # HAVE_DOXYGEN