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