right; this is going badly.
[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 if HAVE_WARNINGS_AS_ERRORS
26 AM_CFLAGS = -Werror
27 endif
28
29 if HAVE_LIBLUA
30 wslua_lib = wslua/libwslua.la
31 wslua_dir = wslua
32 wslua_dist_dir = 
33 else            # HAVE_LIBLUA
34 wslua_lib =
35 wslua_dir =
36 wslua_dist_dir = wslua
37 endif           # HAVE_LIBLUA
38
39
40 SUBDIRS = crypt ftypes dfilter dissectors $(wslua_dir)
41
42 DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
43
44 # EPAN will eventually be a shared library. While I move source code around,
45 # however, it is an archive library.
46
47 ACLOCAL_AMFLAGS = `../aclocal-flags`
48
49 lib_LTLIBRARIES = libwireshark.la
50 libwireshark_la_LDFLAGS = -version-info 0:1:0 @LDFLAGS_SHAREDLIB@
51
52 include Makefile.common
53
54 INCLUDES = -I$(srcdir)/.. -I$(srcdir)/$(LEMON) @LUA_INCLUDES@ \
55         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
56
57 libwireshark_la_SOURCES = \
58         $(LIBWIRESHARK_SRC)     \
59         $(LIBWIRESHARK_INCLUDES)
60
61 EXTRA_libwireshark_la_SOURCES = \
62         g_ascii_strtoull.c      \
63         g_ascii_strtoull.h      \
64         inet_aton.c             \
65         inet_pton.c             \
66         inet_ntop.c             \
67         inet_aton.h             \
68         inet_v6defs.h
69
70 EXTRA_DIST = \
71         dtd_grammar.lemon \
72         dtd_parse.l \
73         dtd_preparse.l \
74         enterprise-numbers  \
75         libwireshark.def        \
76         Makefile.common \
77         Makefile.nmake  \
78         make-sminmpec.pl \
79         radius_dict.l   \
80         tvbtest.c       \
81         reassemble_test.c \
82         uat_load.l      \
83         exntest.c       \
84         doxygen.cfg.in
85
86 CLEANFILES = \
87         libwireshark.a          \
88         libwireshark.la         \
89         *~
90
91 DISTCLEANFILES = \
92         dtd_grammar.out         \
93         dtd_grammar.c           \
94         dtd_grammar.h           \
95         dtd_parse.c             \
96         dtd_preparse.c          \
97         radius_dict.c
98         
99
100 MAINTAINERCLEANFILES = \
101         Makefile.in             \
102         sminmpec.c
103
104
105 #
106 # Add the object files for missing routines, if any.
107 #
108 libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ 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
109 libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib)
110
111 #EXTRA_PROGRAMS = reassemble_test
112 #reassemble_test_LDADD = $(GLIB_LIBS)
113
114 reassemble_test: reassemble_test.o tvbuff.o except.o strutil.o emem.o \
115                  reassemble.o 
116         $(LINK) $^ $(GLIB_LIBS) -lz
117
118 tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o
119         $(LINK) $^ $(GLIB_LIBS) -lz
120
121 exntest: exntest.o except.o
122         $(LINK) $^ $(GLIB_LIBS)
123
124 radius_dict.c: radius_dict.l
125         $(LEX) $^
126
127 uat_load.c: uat_load.l
128         $(LEX) -ouat_load.c $(srcdir)/uat_load.l
129         
130 dtd_parse.c : dtd_parse.l
131         $(LEX) -odtd_parse.c $(srcdir)/dtd_parse.l
132
133 dtd_preparse.c : dtd_preparse.l
134         $(LEX) -odtd_preparse.c $(srcdir)/dtd_preparse.l
135
136 dtd_grammar.h: dtd_grammar.c
137
138 LEMON=../tools/lemon
139
140 dtd_grammar.c: dtd_grammar.lemon $(LEMON)/lemon$(EXEEXT)
141         $(LEMON)/lemon$(EXEEXT) t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
142         
143 tvbtest.o exntest.o: exceptions.h
144
145 sminmpec.c: enterprise-numbers make-sminmpec.pl
146         $(PERL) $(srcdir)/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
147
148 if HAVE_PLUGINS
149
150 if ENABLE_STATIC
151
152 plugin_src = \
153         ../plugins/artnet/packet-artnet.c \
154         ../plugins/asn1/packet-asn1.c \
155         ../plugins/docsis/packet-bpkmattr.c \
156         ../plugins/docsis/packet-bpkmreq.c \
157         ../plugins/docsis/packet-bpkmrsp.c \
158         ../plugins/docsis/packet-docsis.c \
159         ../plugins/docsis/packet-dsaack.c \
160         ../plugins/docsis/packet-dsareq.c \
161         ../plugins/docsis/packet-dsarsp.c \
162         ../plugins/docsis/packet-dscack.c \
163         ../plugins/docsis/packet-dscreq.c \
164         ../plugins/docsis/packet-dscrsp.c \
165         ../plugins/docsis/packet-dsdreq.c \
166         ../plugins/docsis/packet-dsdrsp.c \
167         ../plugins/docsis/packet-intrngreq.c \
168         ../plugins/docsis/packet-macmgmt.c \
169         ../plugins/docsis/packet-map.c \
170         ../plugins/docsis/packet-regack.c \
171         ../plugins/docsis/packet-regreq.c \
172         ../plugins/docsis/packet-regrsp.c \
173         ../plugins/docsis/packet-rngreq.c \
174         ../plugins/docsis/packet-rngrsp.c \
175         ../plugins/docsis/packet-tlv.c \
176         ../plugins/docsis/packet-type29ucd.c \
177         ../plugins/docsis/packet-uccreq.c \
178         ../plugins/docsis/packet-uccrsp.c \
179         ../plugins/docsis/packet-ucd.c \
180         ../plugins/enttec/packet-enttec.c \
181         ../plugins/giop/packet-cosnaming.c \
182         ../plugins/giop/packet-coseventcomm.c \
183         ../plugins/gryphon/packet-gryphon.c \
184         ../plugins/irda/packet-irda.c \
185         ../plugins/lwres/packet-lwres.c \
186         ../plugins/mgcp/packet-mgcp.c \
187         ../plugins/pcli/packet-pcli.c \
188         ../plugins/rdm/packet-rdm.c \
189         ../plugins/rtnet/packet-rtnet.c \
190         ../plugins/v5ua/packet-v5ua.c
191
192 else            # ENABLE_STATIC
193
194 plugin_src =
195
196 endif           # ENABLE_STATIC
197
198 else            # HAVE_PLUGINS
199 plugin_src =
200
201 endif           # HAVE_PLUGINS
202
203 doxygen:
204 if HAVE_DOXYGEN
205         $(DOXYGEN) doxygen.cfg
206 endif           # HAVE_DOXYGEN
207