Don't try to include epan/config.h.win32 in the distribution.
[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: Makefile.am,v 1.46 2004/05/08 21:43:38 gerald Exp $
6 #
7 # Ethereal - Network traffic analyzer
8 # By Gerald Combs <gerald@ethereal.com>
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 SUBDIRS = ftypes dfilter
26
27 # EPAN will eventually be a shared library. While I move source code around,
28 # however, it is an archive library.
29
30 ACLOCAL_AMFLAGS = `../aclocal-flags`
31
32 lib_LTLIBRARIES = libethereal.la
33 libethereal_la_LDFLAGS = -version-info 0:1:0
34
35 include Makefile.common
36
37 INCLUDES = -I$(srcdir)/..
38
39 libethereal_la_SOURCES = \
40         addr_and_mask.c         \
41         addr_and_mask.h         \
42         atalk-utils.c           \
43         atalk-utils.h           \
44         bitswap.c               \
45         bitswap.h               \
46         circuit.c               \
47         circuit.h               \
48         column_info.h           \
49         conversation.c          \
50         conversation.h          \
51         column-utils.c          \
52         column-utils.h          \
53         epan.c                  \
54         epan.h                  \
55         epan_dissect.h          \
56         except.c                \
57         except.h                \
58         exceptions.h            \
59         filesystem.c            \
60         filesystem.h            \
61         frame_data.c            \
62         frame_data.h            \
63         gdebug.h                \
64         int-64bit.c             \
65         int-64bit.h             \
66         ipv4.c                  \
67         ipv4.h                  \
68         ipv6-utils.h            \
69         nstime.h                \
70         osi-utils.c             \
71         osi-utils.h             \
72         packet.c                \
73         packet.h                \
74         packet_info.h           \
75         pint.h                  \
76         plugins.c               \
77         plugins.h               \
78         proto.c                 \
79         proto.h                 \
80         resolv.c                \
81         resolv.h                \
82         report_err.h            \
83         slab.h                  \
84         sna-utils.c             \
85         sna-utils.h             \
86         strutil.c               \
87         strutil.h               \
88         timestamp.c             \
89         timestamp.h             \
90         to_str.c                \
91         to_str.h                \
92         tvbuff.c                \
93         tvbuff.h                \
94         value_string.c          \
95         value_string.h          \
96         $(DISSECTOR_SRC)        \
97         $(DISSECTOR_SUPPORT_SRC)
98
99 EXTRA_libethereal_la_SOURCES =  \
100         inet_aton.c             \
101         inet_pton.c             \
102         inet_ntop.c             \
103         inet_aton.h             \
104         inet_v6defs.h
105
106 EXTRA_DIST = \
107         Makefile.common \
108         Makefile.nmake  \
109         tvbtest.c
110
111 CLEANFILES = \
112         libethereal.a           \
113         libethereal.la          \
114         x11-declarations.h      \
115         x11-register-info.h     \
116         *~
117
118 MAINTAINERCLEANFILES =  \
119         register.c      \
120         ../packet-ncp2222.c
121
122 #
123 # Add the object files for missing routines, if any.
124 #
125 libethereal_la_LIBADD = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ dfilter/libdfilter.la ftypes/libftypes.la @KRB5_LIBS@
126 libethereal_la_DEPENDENCIES = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ dfilter/libdfilter.la ftypes/libftypes.la
127
128 ../packet-ncp2222.c : $(srcdir)/../ncp2222.py
129         $(PYTHON) $(srcdir)/../ncp2222.py -o $@
130
131 tvbtest: tvbtest.o tvbuff.o except.o strutil.o
132         $(LINK) -o tvbtest tvbtest.o tvbuff.o except.o strutil.o `glib-config --libs`
133
134 #
135 # Build "register.c", which contains a function "register_all_protocols()"
136 # that calls the register routines for all protocols.
137 #
138 # We do this by grepping through sources.  If that turns out to be too slow,
139 # maybe we could just require every .o file to have an register routine
140 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
141 #
142 # Formatting conventions:  The name of the proto_register_* routines must
143 # start in column zero, or must be preceded only by "void " starting in
144 # column zero, and must not be inside #if.
145 #
146 # We assume that all dissector routines are in "packet-XXX.c" files.
147 #
148 # For some unknown reason, having a big "for" loop in the Makefile
149 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
150 # they seem to pass only the first few names in the list to the shell,
151 # for some reason.
152 #
153 # Therefore, we have a script to generate the "register.c" file.
154 #
155 # The first argument is the name of the file to write.
156 # The second argument is the directory in which the source files live.
157 # All subsequent arguments are the files to scan.
158 #
159 register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/../make-reg-dotc
160         @if test -n $(PYTHON); then \
161                 echo Making register.c with python ; \
162                 $(PYTHON) $(srcdir)/../make-reg-dotc.py $(srcdir) $(DISSECTOR_SRC) ; \
163         else \
164                 echo Making register.c with shell script ; \
165                 $(srcdir)/../make-reg-dotc register.c $(srcdir) \
166                         $(plugin_src) $(DISSECTOR_SRC) ; \
167         fi
168
169 #
170 # Currently register.c can be included in the distribution because
171 # we always build all protocol dissectors. We used to have to check
172 # whether or not to build the snmp dissector. If we again need to
173 # variably build something, making register.c non-portable, uncomment
174 # the dist-hook line below.
175 #
176 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
177 # its contents depend on the configuration, and therefore we want it
178 # to be built when the first "make" is done; however, Automake insists
179 # on putting *all* source into the distribution.
180 #
181 # We work around this by having a "dist-hook" rule that deletes
182 # "register.c", so that "dist" won't pick it up.
183 #
184 #dist-hook:
185 #       @rm -f $(distdir)/register.c
186
187 #
188 # Build various header files for the X11 dissector.
189 #
190 x11-declarations.h x11-register-info.h: ../x11-fields ../process-x11-fields.pl
191         $(PERL) $(srcdir)/../process-x11-fields.pl <$(srcdir)/../x11-fields
192
193 if HAVE_PLUGINS
194
195 if ENABLE_STATIC
196
197 plugin_src = \
198         ../plugins/acn/packet-acn.c \
199         ../plugins/artnet/packet-artnet.c \
200         ../plugins/asn1/packet-asn1.c \
201         ../plugins/docsis/packet-bpkmattr.c \
202         ../plugins/docsis/packet-bpkmreq.c \
203         ../plugins/docsis/packet-bpkmrsp.c \
204         ../plugins/docsis/packet-docsis.c \
205         ../plugins/docsis/packet-dsaack.c \
206         ../plugins/docsis/packet-dsareq.c \
207         ../plugins/docsis/packet-dsarsp.c \
208         ../plugins/docsis/packet-dscack.c \
209         ../plugins/docsis/packet-dscreq.c \
210         ../plugins/docsis/packet-dscrsp.c \
211         ../plugins/docsis/packet-dsdreq.c \
212         ../plugins/docsis/packet-dsdrsp.c \
213         ../plugins/docsis/packet-intrngreq.c \
214         ../plugins/docsis/packet-macmgmt.c \
215         ../plugins/docsis/packet-map.c \
216         ../plugins/docsis/packet-regack.c \
217         ../plugins/docsis/packet-regreq.c \
218         ../plugins/docsis/packet-regrsp.c \
219         ../plugins/docsis/packet-rngreq.c \
220         ../plugins/docsis/packet-rngrsp.c \
221         ../plugins/docsis/packet-tlv.c \
222         ../plugins/docsis/packet-type29ucd.c \
223         ../plugins/docsis/packet-uccreq.c \
224         ../plugins/docsis/packet-uccrsp.c \
225         ../plugins/docsis/packet-ucd.c \
226         ../plugins/enttec/packet-enttec.c \
227         ../plugins/giop/packet-cosnaming.c \
228         ../plugins/giop/packet-coseventcomm.c \
229         ../plugins/gryphon/packet-gryphon.c \
230         ../plugins/irda/packet-irda.c \
231         ../plugins/lwres/packet-lwres.c \
232         ../plugins/megaco/packet-megaco.c \
233         ../plugins/mgcp/packet-mgcp.c \
234         ../plugins/pcli/packet-pcli.c \
235         ../plugins/rdm/packet-rdm.c \
236         ../plugins/rtnet/packet-rtnet.c \
237         ../plugins/v5ua/packet-v5ua.c
238
239 else            # ENABLE_STATIC
240
241 plugin_src =
242
243 endif           # ENABLE_STATIC
244
245 else            # HAVE_PLUGINS
246 plugin_src =
247
248 endif           # HAVE_PLUGINS
249