# Makefile.am
# Automake file for Ethereal
#
-# $Id: Makefile.am,v 1.82 1999/10/13 06:47:47 guy Exp $
+# $Id: Makefile.am,v 1.105 1999/11/11 21:21:59 nneul Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@zing.org>
# Any POSIX-compatible YACC should honor the -p flag
YFLAGS=-d -p dfilter_
-ethereal_SOURCES = \
- alignment.h \
- capture.c \
- capture.h \
- colors.c \
- colors.h \
- column.c \
- column.h \
- dfilter-int.h \
- dfilter-grammar.y \
- dfilter-scanner.l \
- dfilter.c \
- dfilter.h \
- display.c \
- display.h \
- ethertype.c \
- etypes.h \
- file.c \
- file.h \
- follow.c \
- follow.h \
- globals.h \
+DISSECTOR_SOURCES = \
packet-aarp.c \
+ packet-afs.c \
+ packet-afs.h \
packet-arp.c \
packet-ascend.c\
packet-atalk.c \
+ packet-atalk.h \
packet-atm.c \
+ packet-bgp.c \
packet-bootp.c \
+ packet-bootparams.c \
+ packet-bootparams.h \
packet-bpdu.c \
packet-cdp.c \
packet-clip.c \
packet-http.c \
packet-icmpv6.c\
packet-icp.c \
+ packet-icq.c \
+ packet-imap.c \
packet-ip.c \
packet-ip.h \
packet-ipp.c \
packet-ipx.h \
packet-isakmp.c\
packet-lapb.c \
+ packet-lapd.c \
packet-llc.c \
packet-lpd.c \
+ packet-mount.c \
+ packet-mount.h \
packet-nbipx.c \
packet-nbns.c \
packet-ncp.c \
packet-ncp.h \
packet-netbios.c \
packet-netbios.h \
+ packet-nfs.c \
+ packet-nfs.h \
packet-nntp.c \
+ packet-ntp.c \
+ packet-ntp.h \
packet-null.c \
packet-osi.c \
packet-ospf.c \
packet-ospf.h \
packet-pim.c \
packet-pop.c \
+ packet-portmap.c \
+ packet-portmap.h \
packet-ppp.c \
packet-pppoe.c \
packet-pptp.c \
+ packet-q931.c \
packet-radius.c\
packet-raw.c \
+ packet-rpc.c \
+ packet-rpc.h \
packet-rip.c \
packet-rip.h \
packet-ripng.c \
packet-rsvp.c \
packet-rsvp.h \
packet-rtsp.c \
+ packet-rx.c \
+ packet-rx.h \
packet-sdp.c \
packet-smb.c \
packet-sna.c \
+ packet-sna.h \
+ packet-stat.c \
+ packet-stat.h \
packet-tcp.c \
packet-telnet.c\
packet-tftp.c \
packet-udp.c \
packet-vines.c \
packet-vines.h \
+ packet-vlan.c \
packet-x25.c \
+ packet-yhoo.c \
+ packet-yhoo.h \
+ packet-ypbind.c \
+ packet-ypbind.h \
+ packet-ypserv.c \
+ packet-ypserv.h \
+ packet-ypxfr.c \
+ packet-ypxfr.h
+
+ethereal_SOURCES = \
+ alignment.h \
+ capture.c \
+ capture.h \
+ colors.c \
+ colors.h \
+ column.c \
+ column.h \
+ conversation.c \
+ conversation.h \
+ dfilter-int.h \
+ dfilter-grammar.y \
+ dfilter-scanner.l \
+ dfilter.c \
+ dfilter.h \
+ ethertype.c \
+ etypes.h \
+ file.c \
+ file.h \
+ follow.c \
+ follow.h \
+ globals.h \
+ inet_v6defs.h \
+ ipproto.c \
packet.c \
packet.h \
prefs.c \
proto.h \
ps.c \
ps.h \
+ register.c \
+ register.h \
resolv.c \
resolv.h \
smb.h \
util.c \
util.h \
xdlc.c \
- xdlc.h
+ xdlc.h \
+ $(DISSECTOR_SOURCES)
EXTRA_ethereal_SOURCES = \
dfilter-grammar.c \
strerror.h \
strncasecmp.c \
mkstemp.c \
- inet_aton.c
+ inet_aton.c \
+ inet_pton.c \
+ inet_ntop.c
ethereal_DEPENDENCIES = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
-@STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ wiretap/libwiretap.a gtk/libui.a
+@STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
+wiretap/libwiretap.a gtk/libui.a
ethereal_LDADD = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \
-@STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ wiretap/libwiretap.a gtk/libui.a \
+@STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\
+wiretap/libwiretap.a gtk/libui.a \
@SNMP_A@
+#
+# Build "register.c", which contains a function "register_all_protocols()"
+# that calls the register routines for all protocols.
+#
+# We do this by grepping through sources. If that turns out to be too slow,
+# maybe we could just require every .o file to have an register routine
+# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
+#
+# Formatting conventions: The name of the proto_register_* routines must
+# start in column zero, or must be preceded only by "void " starting in
+# column zero, and must not be inside #if.
+#
+# We assume that all dissector routines are in "packet-XXX.c" files,
+# or in "packet.c".
+#
+# For some unknown reason, having a big "for" loop in the Makefile
+# to scan all the "packet-XXX.c" files doesn't work with some "make"s;
+# they seem to pass only the first few names in the list to the shell,
+# for some reason.
+#
+# Therefore, we have a script to generate the "register.c" file.
+#
+# The first argument is the directory in which the source files live.
+# All subsequent arguments are the files to scan.
+#
+register.c: packet.c $(DISSECTOR_SOURCES) @SNMP_C@
+ @echo Making register.c
+ @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES) @SNMP_C@
+
ps.c: print.ps rdps
./rdps $(srcdir)/print.ps ps.c
$(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
DISTCLEANFILES = \
+ register.c \
rdps \
ps.c \
*~
image/icon-excl.xpm \
image/icon-ethereal.xpm \
Makefile.nmake \
+ make-reg-dotc \
manuf \
print.ps \
README.irix \
randpkt.c \
rdps.c
+#
+# Oh, yuk. We don't want to include "register.c" in the distribution, as
+# its contents depend on the configuration, and therefore we want it
+# to be built when the first "make" is done; however, Automake insists
+# on putting *all* source into the distribution.
+#
+# We work around this by having a "disk-hook" rule that deletes
+# "register.c", so that "dist" won't pick it up.
+#
+dist-hook:
+ @rm -f $(distdir)/register.c
+
SUBDIRS = wiretap gtk @ethereal_SUBDIRS@
ethereal.1: ethereal doc/ethereal.pod.template