2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.142 2000/01/03 06:59:06 guy 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
34 ## use @LIBLTDL@ because some broken makes do not accept macros in targets
35 ## we can only do this because our LIBLTDL does not contain ${top_builddir}
36 @LIBLTDL@: libtool libltdl/libtool libltdl/config.h \
37 $(srcdir)/libltdl/ltdl.c $(srcdir)/libltdl/ltdl.h
38 (cd libltdl; $(MAKE) `echo $(LIBLTDL) | sed 's,.*\.\./libltdl/,,g'`)
39 # Without the following line, the check may fail if libltdl/libtool is
40 # removed after libltdl is configured
41 libltdl/libtool libltdl/config.h:
239 EXTRA_ethereal_SOURCES = \
254 ethereal_DEPENDENCIES = @SNPRINTF_O@ @STRERROR_O@ \
255 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
256 wiretap/libwiretap.a gtk/libui.a \
258 plugins/gryphon/gryphon.la
259 ethereal_LDADD = @SNPRINTF_O@ @STRERROR_O@ \
260 @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
261 wiretap/libwiretap.a gtk/libui.a \
263 @LIBLTDL@ "-dlopen" self \
264 "-dlopen" plugins/gryphon/gryphon.la
265 ethereal_LDFLAGS = -export-dynamic
269 # Build "register.c", which contains a function "register_all_protocols()"
270 # that calls the register routines for all protocols.
272 # We do this by grepping through sources. If that turns out to be too slow,
273 # maybe we could just require every .o file to have an register routine
274 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
276 # Formatting conventions: The name of the proto_register_* routines must
277 # start in column zero, or must be preceded only by "void " starting in
278 # column zero, and must not be inside #if.
280 # We assume that all dissector routines are in "packet-XXX.c" files,
283 # For some unknown reason, having a big "for" loop in the Makefile
284 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
285 # they seem to pass only the first few names in the list to the shell,
288 # Therefore, we have a script to generate the "register.c" file.
290 # The first argument is the directory in which the source files live.
291 # All subsequent arguments are the files to scan.
293 register.c: packet.c $(DISSECTOR_SOURCES)
294 @echo Making register.c
295 @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
298 ./rdps $(srcdir)/print.ps ps.c
301 $(CC) -o rdps $(srcdir)/rdps.c
304 $(COMPILE) -c $(srcdir)/editcap.c
306 editcap: editcap.o wiretap/libwiretap.a
307 $(LINK) -o editcap editcap.o wiretap/libwiretap.a `glib-config --libs` -lz
310 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
312 randpkt: randpkt.o wiretap/libwiretap.a
313 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
326 doc/ethereal.pod.template \
331 image/ethereal48x48-trans.png \
332 image/ethereal48x48.png \
333 image/icon-excl.xpm \
334 image/icon-ethereal.xpm \
351 # Oh, yuk. We don't want to include "register.c" in the distribution, as
352 # its contents depend on the configuration, and therefore we want it
353 # to be built when the first "make" is done; however, Automake insists
354 # on putting *all* source into the distribution.
356 # We work around this by having a "dist-hook" rule that deletes
357 # "register.c", so that "dist" won't pick it up.
360 @rm -f $(distdir)/register.c
362 SUBDIRS = wiretap gtk plugins libltdl @ethereal_SUBDIRS@
364 ethereal.1: ethereal doc/ethereal.pod.template
366 $(MAKE) ../ethereal.1 )
368 dfilter-scanner.c : dfilter-scanner.l
369 $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c
371 INCLUDES = -I$(srcdir)/libltdl
373 libtool: $(LIBTOOL_DEPS)
374 $(SHELL) ./config.status --recheck