2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.134 1999/12/12 22:39:29 gram Exp $
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@zing.org>
8 # Copyright 1998 Gerald Combs
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.
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.
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.
25 bin_PROGRAMS = ethereal
31 # Any POSIX-compatible YACC should honor the -p flag
217 EXTRA_ethereal_SOURCES = \
232 ethereal_DEPENDENCIES = @SNPRINTF_O@ @STRERROR_O@ \
233 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
234 wiretap/libwiretap.a gtk/libui.a
235 ethereal_LDADD = @SNPRINTF_O@ @STRERROR_O@ \
236 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
237 wiretap/libwiretap.a gtk/libui.a \
241 # Build "register.c", which contains a function "register_all_protocols()"
242 # that calls the register routines for all protocols.
244 # We do this by grepping through sources. If that turns out to be too slow,
245 # maybe we could just require every .o file to have an register routine
246 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
248 # Formatting conventions: The name of the proto_register_* routines must
249 # start in column zero, or must be preceded only by "void " starting in
250 # column zero, and must not be inside #if.
252 # We assume that all dissector routines are in "packet-XXX.c" files,
255 # For some unknown reason, having a big "for" loop in the Makefile
256 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
257 # they seem to pass only the first few names in the list to the shell,
260 # Therefore, we have a script to generate the "register.c" file.
262 # The first argument is the directory in which the source files live.
263 # All subsequent arguments are the files to scan.
265 register.c: packet.c $(DISSECTOR_SOURCES)
266 @echo Making register.c
267 @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
270 ./rdps $(srcdir)/print.ps ps.c
273 $(CC) -o rdps $(srcdir)/rdps.c
276 $(COMPILE) -c $(srcdir)/editcap.c
278 editcap: editcap.o wiretap/libwiretap.a
279 $(LINK) -o editcap editcap.o wiretap/libwiretap.a `glib-config --libs` -lz
282 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
284 randpkt: randpkt.o wiretap/libwiretap.a
285 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
298 doc/ethereal.pod.template \
302 image/icon-excl.xpm \
303 image/icon-ethereal.xpm \
320 # Oh, yuk. We don't want to include "register.c" in the distribution, as
321 # its contents depend on the configuration, and therefore we want it
322 # to be built when the first "make" is done; however, Automake insists
323 # on putting *all* source into the distribution.
325 # We work around this by having a "disk-hook" rule that deletes
326 # "register.c", so that "dist" won't pick it up.
329 @rm -f $(distdir)/register.c
331 SUBDIRS = wiretap gtk @ethereal_SUBDIRS@
333 ethereal.1: ethereal doc/ethereal.pod.template
335 $(MAKE) ../ethereal.1 )
337 dfilter-scanner.c : dfilter-scanner.l
338 $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c