diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/Makefile.am | 120 | ||||
-rw-r--r-- | epan/Makefile.common | 482 | ||||
-rw-r--r-- | epan/Makefile.nmake | 50 | ||||
-rw-r--r-- | epan/configure.in | 9 |
4 files changed, 656 insertions, 5 deletions
diff --git a/epan/Makefile.am b/epan/Makefile.am index 2dc69e6eaf..24b965787c 100644 --- a/epan/Makefile.am +++ b/epan/Makefile.am @@ -2,7 +2,7 @@ # Automake file for the EPAN library # (Ethereal Protocol ANalyzer Library) # -# $Id: Makefile.am,v 1.32 2003/12/06 06:22:10 gram Exp $ +# $Id: Makefile.am,v 1.33 2004/03/02 01:21:56 jmayer Exp $ # # Ethereal - Network traffic analyzer # By Gerald Combs <gerald@ethereal.com> @@ -31,6 +31,8 @@ ACLOCAL_AMFLAGS = `../aclocal-flags` noinst_LIBRARIES = libethereal.a +include Makefile.common + INCLUDES = -I$(srcdir)/.. libethereal_a_SOURCES = \ @@ -85,7 +87,9 @@ libethereal_a_SOURCES = \ tvbuff.c \ tvbuff.h \ value_string.c \ - value_string.h + value_string.h \ + $(DISSECTOR_SRC) \ + $(DISSECTOR_SUPPORT_SRC) EXTRA_libethereal_a_SOURCES = \ inet_aton.c \ @@ -103,6 +107,9 @@ CLEANFILES = \ libethereal.a \ *~ +MAINTAINERCLEANFILES = \ + register.c + # # Add the object files for missing routines, if any. # @@ -112,3 +119,112 @@ libethereal_a_DEPENDENCIES = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ tvbtest: tvbtest.o tvbuff.o except.o strutil.o $(LINK) -o tvbtest tvbtest.o tvbuff.o except.o strutil.o `glib-config --libs` + +# +# 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. +# +# 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 name of the file to write. +# The second argument is the directory in which the source files live. +# All subsequent arguments are the files to scan. +# +register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/../make-reg-dotc + @if test -n $(PYTHON); then \ + echo Making register.c with python ; \ + $(PYTHON) $(srcdir)/../make-reg-dotc.py $(srcdir) $(DISSECTOR_SRC) ; \ + else \ + echo Making register.c with shell script ; \ + $(srcdir)/../make-reg-dotc register.c $(srcdir) \ + $(plugin_src) $(DISSECTOR_SRC) ; \ + fi + +# +# Currently register.c can be included in the distribution because +# we always build all protocol dissectors. We used to have to check +# whether or not to build the snmp dissector. If we again need to +# variably build something, making register.c non-portable, uncomment +# the dist-hook line below. +# +# 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 "dist-hook" rule that deletes +# "register.c", so that "dist" won't pick it up. +# +#dist-hook: +# @rm -f $(distdir)/register.c + +if HAVE_PLUGINS + +if ENABLE_STATIC + +plugin_src = \ + plugins/acn/packet-acn.c \ + plugins/artnet/packet-artnet.c \ + plugins/asn1/packet-asn1.c \ + plugins/docsis/packet-bpkmattr.c \ + plugins/docsis/packet-bpkmreq.c \ + plugins/docsis/packet-bpkmrsp.c \ + plugins/docsis/packet-docsis.c \ + plugins/docsis/packet-dsaack.c \ + plugins/docsis/packet-dsareq.c \ + plugins/docsis/packet-dsarsp.c \ + plugins/docsis/packet-dscack.c \ + plugins/docsis/packet-dscreq.c \ + plugins/docsis/packet-dscrsp.c \ + plugins/docsis/packet-dsdreq.c \ + plugins/docsis/packet-dsdrsp.c \ + plugins/docsis/packet-macmgmt.c \ + plugins/docsis/packet-map.c \ + plugins/docsis/packet-regack.c \ + plugins/docsis/packet-regreq.c \ + plugins/docsis/packet-regrsp.c \ + plugins/docsis/packet-rngreq.c \ + plugins/docsis/packet-rngrsp.c \ + plugins/docsis/packet-tlv.c \ + plugins/docsis/packet-uccreq.c \ + plugins/docsis/packet-uccrsp.c \ + plugins/docsis/packet-ucd.c \ + plugins/enttec/packet-enttec.c \ + plugins/giop/packet-cosnaming.c \ + plugins/giop/packet-coseventcomm.c \ + plugins/gryphon/packet-gryphon.c \ + plugins/irda/packet-irda.c \ + plugins/lwres/packet-lwres.c \ + plugins/megaco/packet-megaco.c \ + plugins/mgcp/packet-mgcp.c \ + plugins/pcli/packet-pcli.c \ + plugins/rdm/packet-rdm.c \ + plugins/rtnet/packet-rtnet.c \ + plugins/v5ua/packet-v5ua.c + +else # ENABLE_STATIC + +plugin_src = + +endif # ENABLE_STATIC + +else # HAVE_PLUGINS +plugin_src = + +endif # HAVE_PLUGINS + diff --git a/epan/Makefile.common b/epan/Makefile.common new file mode 100644 index 0000000000..1d7270d67f --- /dev/null +++ b/epan/Makefile.common @@ -0,0 +1,482 @@ +# Makefile.common +# Contains the stuff from Makefile.am and Makefile.nmake that is +# a) common to both files and +# b) portable between both files +# +# $Id: Makefile.common,v 1.1 2004/03/02 01:21:56 jmayer Exp $ +# +# Ethereal - Network traffic analyzer +# By Gerald Combs <gerald@ethereal.com> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +# the dissector sources (without any helpers) +DISSECTOR_SRC = \ + register.c \ + ../packet-aarp.c \ + ../packet-acap.c \ + ../packet-acse.c \ + ../packet-afp.c \ + ../packet-afs.c \ + ../packet-aim.c \ + ../packet-ajp13.c \ + ../packet-alcap.c \ + ../packet-ans.c \ + ../packet-ansi_637.c \ + ../packet-ansi_683.c \ + ../packet-ansi_a.c \ + ../packet-ansi_map.c \ + ../packet-aodv.c \ + ../packet-arcnet.c \ + ../packet-arp.c \ + ../packet-asap.c \ + ../packet-ascend.c \ + ../packet-asf.c \ + ../packet-atalk.c \ + ../packet-atm.c \ + ../packet-auto_rp.c \ + ../packet-bacapp.c \ + ../packet-bacnet.c \ + ../packet-beep.c \ + ../packet-ber.c \ + ../packet-bfd.c \ + ../packet-bgp.c \ + ../packet-bofl.c \ + ../packet-bootp.c \ + ../packet-bootparams.c \ + ../packet-bpdu.c \ + ../packet-brdwlk.c \ + ../packet-bssap.c \ + ../packet-bssgp.c \ + ../packet-bvlc.c \ + ../packet-cast.c \ + ../packet-ccsds.c \ + ../packet-cdp.c \ + ../packet-cgmp.c \ + ../packet-chdlc.c \ + ../packet-cisco-oui.c \ + ../packet-clearcase.c \ + ../packet-clip.c \ + ../packet-clnp.c \ + ../packet-cops.c \ + ../packet-cosine.c \ + ../packet-cpfi.c \ + ../packet-cpha.c \ + ../packet-cups.c \ + ../packet-data.c \ + ../packet-dccp.c \ + ../packet-dcerpc-afs4int.c \ + ../packet-dcerpc-atsvc.c \ + ../packet-dcerpc-bossvr.c \ + ../packet-dcerpc-browser.c \ + ../packet-dcerpc-budb.c \ + ../packet-dcerpc-butc.c \ + ../packet-dcerpc-cds_clerkserver.c \ + ../packet-dcerpc-cds_solicit.c \ + ../packet-dcerpc-conv.c \ + ../packet-dcerpc-cprpc_server.c \ + ../packet-dcerpc-dce122.c \ + ../packet-dcerpc-dfs.c \ + ../packet-dcerpc-dnsserver.c \ + ../packet-dcerpc-drsuapi.c \ + ../packet-dcerpc-dtsprovider.c \ + ../packet-dcerpc-dtsstime_req.c \ + ../packet-dcerpc-epm.c \ + ../packet-dcerpc-epm4.c \ + ../packet-dcerpc-fldb.c \ + ../packet-dcerpc-ftserver.c \ + ../packet-dcerpc-icl_rpc.c \ + ../packet-dcerpc-initshutdown.c \ + ../packet-dcerpc-krb5rpc.c \ + ../packet-dcerpc-llb.c \ + ../packet-dcerpc-lsa-ds.c \ + ../packet-dcerpc-lsa.c \ + ../packet-dcerpc-mapi.c \ + ../packet-dcerpc-messenger.c \ + ../packet-dcerpc-mgmt.c \ + ../packet-dcerpc-ndr.c \ + ../packet-dcerpc-netlogon.c \ + ../packet-dcerpc-nspi.c \ + ../packet-dcerpc-oxid.c \ + ../packet-dcerpc-rdaclif.c \ + ../packet-dcerpc-reg.c \ + ../packet-dcerpc-remact.c \ + ../packet-dcerpc-rep_proc.c \ + ../packet-dcerpc-roverride.c \ + ../packet-dcerpc-rpriv.c \ + ../packet-dcerpc-rs_acct.c \ + ../packet-dcerpc-rs_attr.c \ + ../packet-dcerpc-rs_attr_schema.c \ + ../packet-dcerpc-rs_bind.c \ + ../packet-dcerpc-rs_misc.c \ + ../packet-dcerpc-rs_pgo.c \ + ../packet-dcerpc-rs_plcy.c \ + ../packet-dcerpc-rs_prop_acct.c \ + ../packet-dcerpc-rs_prop_acl.c \ + ../packet-dcerpc-rs_prop_attr.c \ + ../packet-dcerpc-rs_prop_pgo.c \ + ../packet-dcerpc-rs_prop_plcy.c \ + ../packet-dcerpc-rs_pwd_mgmt.c \ + ../packet-dcerpc-rs_repadm.c \ + ../packet-dcerpc-rs_replist.c \ + ../packet-dcerpc-rs_repmgr.c \ + ../packet-dcerpc-rs_unix.c \ + ../packet-dcerpc-rsec_login.c \ + ../packet-dcerpc-samr.c \ + ../packet-dcerpc-secidmap.c \ + ../packet-dcerpc-spoolss.c \ + ../packet-dcerpc-srvsvc.c \ + ../packet-dcerpc-svcctl.c \ + ../packet-dcerpc-tapi.c \ + ../packet-dcerpc-tkn4int.c \ + ../packet-dcerpc-trksvr.c \ + ../packet-dcerpc-ubikdisk.c \ + ../packet-dcerpc-ubikvote.c \ + ../packet-dcerpc-update.c \ + ../packet-dcerpc-wkssvc.c \ + ../packet-dcerpc.c \ + ../packet-ddtp.c \ + ../packet-dec-bpdu.c \ + ../packet-dhcpv6.c \ + ../packet-diameter.c \ + ../packet-diffserv-mpls-common.c \ + ../packet-distcc.c \ + ../packet-dlsw.c \ + ../packet-dns.c \ + ../packet-dsi.c \ + ../packet-dvmrp.c \ + ../packet-eap.c \ + ../packet-eapol.c \ + ../packet-echo.c \ + ../packet-edonkey.c \ + ../packet-eigrp.c \ + ../packet-enc.c \ + ../packet-enip.c \ + ../packet-esis.c \ + ../packet-eth.c \ + ../packet-etherip.c \ + ../packet-ethertype.c \ + ../packet-fc.c \ + ../packet-fcct.c \ + ../packet-fcdns.c \ + ../packet-fcels.c \ + ../packet-fcfcs.c \ + ../packet-fcfzs.c \ + ../packet-fcip.c \ + ../packet-fclctl.c \ + ../packet-fcp.c \ + ../packet-fcsb3.c \ + ../packet-fcsp.c \ + ../packet-fcswils.c \ + ../packet-fddi.c \ + ../packet-fix.c \ + ../packet-fr.c \ + ../packet-frame.c \ + ../packet-ftp.c \ + ../packet-fw1.c \ + ../packet-giop.c \ + ../packet-gmrp.c \ + ../packet-gnutella.c \ + ../packet-gprs-ns.c \ + ../packet-gre.c \ + ../packet-gsm_a.c \ + ../packet-gsm_map.c \ + ../packet-gsm_sms.c \ + ../packet-gsm_sms_ud.c \ + ../packet-gssapi.c \ + ../packet-gtp.c \ + ../packet-gvrp.c \ + ../packet-h1.c \ + ../packet-h225.c \ + ../packet-h245.c \ + ../packet-h261.c \ + ../packet-h263.c \ + ../packet-h450.c \ + ../packet-hclnfsd.c \ + ../packet-hpext.c \ + ../packet-hsrp.c \ + ../packet-http.c \ + ../packet-hyperscsi.c \ + ../packet-iapp.c \ + ../packet-iax2.c \ + ../packet-ib.c \ + ../packet-icap.c \ + ../packet-icmpv6.c \ + ../packet-icp.c \ + ../packet-icq.c \ + ../packet-ieee80211.c \ + ../packet-ieee8023.c \ + ../packet-igap.c \ + ../packet-igmp.c \ + ../packet-igrp.c \ + ../packet-image-gif.c \ + ../packet-image-jfif.c \ + ../packet-imap.c \ + ../packet-ip.c \ + ../packet-ipfc.c \ + ../packet-ipmi.c \ + ../packet-ipp.c \ + ../packet-ipsec-udp.c \ + ../packet-ipsec.c \ + ../packet-ipv6.c \ + ../packet-ipx.c \ + ../packet-ipxwan.c \ + ../packet-irc.c \ + ../packet-isakmp.c \ + ../packet-iscsi.c \ + ../packet-isdn.c \ + ../packet-isis-clv.c \ + ../packet-isis-hello.c \ + ../packet-isis-lsp.c \ + ../packet-isis-snp.c \ + ../packet-isis.c \ + ../packet-isl.c \ + ../packet-ismp.c \ + ../packet-isns.c \ + ../packet-isup.c \ + ../packet-iua.c \ + ../packet-jabber.c \ + ../packet-kadm5.c \ + ../packet-kerberos.c \ + ../packet-klm.c \ + ../packet-kpasswd.c \ + ../packet-l2tp.c \ + ../packet-lapb.c \ + ../packet-lapbether.c \ + ../packet-lapd.c \ + ../packet-laplink.c \ + ../packet-ldap.c \ + ../packet-ldp.c \ + ../packet-llc.c \ + ../packet-lmi.c \ + ../packet-lmp.c \ + ../packet-lpd.c \ + ../packet-lwapp.c \ + ../packet-m2pa.c \ + ../packet-m2tp.c \ + ../packet-m2ua.c \ + ../packet-m3ua.c \ + ../packet-mbtcp.c \ + ../packet-mdshdr.c \ + ../packet-mip.c \ + ../packet-mip6.c \ + ../packet-mmse.c \ + ../packet-mount.c \ + ../packet-mpeg1.c \ + ../packet-mpls.c \ + ../packet-mrdisc.c \ + ../packet-msdp.c \ + ../packet-msn-messenger.c \ + ../packet-msnip.c \ + ../packet-msproxy.c \ + ../packet-mtp2.c \ + ../packet-mtp3.c \ + ../packet-mtp3mg.c \ + ../packet-multipart.c \ + ../packet-mysql.c \ + ../packet-nbipx.c \ + ../packet-nbns.c \ + ../packet-ncp.c \ + ../packet-ncp2222.c \ + ../packet-ncp-nmas.c \ + ../packet-ndmp.c \ + ../packet-ndps.c \ + ../packet-netbios.c \ + ../packet-netflow.c \ + ../packet-nfs.c \ + ../packet-nfsacl.c \ + ../packet-nfsauth.c \ + ../packet-nisplus.c \ + ../packet-nlm.c \ + ../packet-nlsp.c \ + ../packet-nntp.c \ + ../packet-nt-oui.c \ + ../packet-nt-sonmp.c \ + ../packet-nt-tpcp.c \ + ../packet-ntlmssp.c \ + ../packet-ntp.c \ + ../packet-null.c \ + ../packet-olsr.c \ + ../packet-osi-options.c \ + ../packet-osi.c \ + ../packet-ospf.c \ + ../packet-pcnfsd.c \ + ../packet-per.c \ + ../packet-pflog.c \ + ../packet-pgm.c \ + ../packet-pim.c \ + ../packet-pop.c \ + ../packet-portmap.c \ + ../packet-postgresql.c \ + ../packet-ppp.c \ + ../packet-pppoe.c \ + ../packet-pptp.c \ + ../packet-pres.c \ + ../packet-prism.c \ + ../packet-q2931.c \ + ../packet-q931.c \ + ../packet-q933.c \ + ../packet-qllc.c \ + ../packet-quake.c \ + ../packet-quake2.c \ + ../packet-quake3.c \ + ../packet-quakeworld.c \ + ../packet-radius.c \ + ../packet-radiotap.c \ + ../packet-ranap.c \ + ../packet-raw.c \ + ../packet-rip.c \ + ../packet-ripng.c \ + ../packet-rlogin.c \ + ../packet-rmcp.c \ + ../packet-rmi.c \ + ../packet-rmp.c \ + ../packet-rpc.c \ + ../packet-rpl.c \ + ../packet-rquota.c \ + ../packet-rsh.c \ + ../packet-rstat.c \ + ../packet-rsvp.c \ + ../packet-rsync.c \ + ../packet-rtcp.c \ + ../packet-rtp-events.c \ + ../packet-rtp.c \ + ../packet-rtsp.c \ + ../packet-rwall.c \ + ../packet-rx.c \ + ../packet-sadmind.c \ + ../packet-sap.c \ + ../packet-sccp.c \ + ../packet-sccpmg.c \ + ../packet-scsi.c \ + ../packet-sctp.c \ + ../packet-sdlc.c \ + ../packet-sdp.c \ + ../packet-sebek.c \ + ../packet-ses.c \ + ../packet-sflow.c \ + ../packet-sip.c \ + ../packet-sipfrag.c \ + ../packet-skinny.c \ + ../packet-slimp3.c \ + ../packet-sll.c \ + ../packet-slowprotocols.c \ + ../packet-slsk.c \ + ../packet-smb-browse.c \ + ../packet-smb-common.c \ + ../packet-smb-logon.c \ + ../packet-smb-mailslot.c \ + ../packet-smb-pipe.c \ + ../packet-smb-sidsnooping.c \ + ../packet-smb.c \ + ../packet-smpp.c \ + ../packet-smtp.c \ + ../packet-sna.c \ + ../packet-snaeth.c \ + ../packet-snmp.c \ + ../packet-socks.c \ + ../packet-spnego.c \ + ../packet-spray.c \ + ../packet-srvloc.c \ + ../packet-sscop.c \ + ../packet-ssh.c \ + ../packet-ssl.c \ + ../packet-stat-notify.c \ + ../packet-stat.c \ + ../packet-stun.c \ + ../packet-sua.c \ + ../packet-syslog.c \ + ../packet-t38.c \ + ../packet-tacacs.c \ + ../packet-tcap.c \ + ../packet-tcp.c \ + ../packet-tds.c \ + ../packet-teimanagement.c \ + ../packet-telnet.c \ + ../packet-teredo.c \ + ../packet-text-media.c \ + ../packet-tftp.c \ + ../packet-time.c \ + ../packet-tns.c \ + ../packet-tpkt.c \ + ../packet-tr.c \ + ../packet-trmac.c \ + ../packet-tsp.c \ + ../packet-tzsp.c \ + ../packet-ucp.c \ + ../packet-udp.c \ + ../packet-v120.c \ + ../packet-vines.c \ + ../packet-vj.c \ + ../packet-vlan.c \ + ../packet-vrrp.c \ + ../packet-vtp.c \ + ../packet-wap.c \ + ../packet-wbxml.c \ + ../packet-wccp.c \ + ../packet-wcp.c \ + ../packet-wfleet-hdlc.c \ + ../packet-who.c \ + ../packet-wlancap.c \ + ../packet-wsp.c \ + ../packet-wtls.c \ + ../packet-wtp.c \ + ../packet-x11.c \ + ../packet-x25.c \ + ../packet-x29.c \ + ../packet-xdmcp.c \ + ../packet-xot.c \ + ../packet-xyplex.c \ + ../packet-yhoo.c \ + ../packet-ymsg.c \ + ../packet-ypbind.c \ + ../packet-yppasswd.c \ + ../packet-ypserv.c \ + ../packet-ypxfr.c \ + ../packet-zebra.c + +# dissector helpers (needed from the dissectors, but not a dissector itself) +DISSECTOR_SUPPORT_SRC = \ + ../adler32.c \ + ../afn.c \ + ../asn1.c \ + ../column.c \ + ../crc32.c \ + ../crypt-des.c \ + ../crypt-md4.c \ + ../crypt-md5.c \ + ../crypt-rc4.c \ + ../follow.c \ + ../g711.c \ + ../h225-persistentdata.c \ + ../in_cksum.c \ + ../ipproto.c \ + ../packet-dcerpc-nt.c \ + ../prefs.c \ + ../ptvcursor.c \ + ../reassemble.c \ + ../req_resp_hdrs.c \ + ../t35.c \ + ../tap.c \ + ../util.c \ + ../xdlc.c \ + ../xmlstub.c + +# "BUILT_SOURCES" are built before any "make all" or "make check" targets. +BUILT_SOURCES = \ + register.c + diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index 9df35ef8d9..d76a1b025c 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -1,10 +1,12 @@ ## Makefile for building ethereal.exe with Microsoft C and nmake ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake # -# $Id: Makefile.nmake,v 1.33 2004/01/22 19:27:58 ulfl Exp $ +# $Id: Makefile.nmake,v 1.34 2004/03/02 01:21:56 jmayer Exp $ include ..\config.nmake +include Makefile.common + ############### no need to modify below this line ######### CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \ @@ -19,7 +21,7 @@ libethereal_LIBS = \ $(GLIB_LIBS) .c.obj:: - $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $< + $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $< OBJECTS=atalk-utils.obj \ bitswap.obj \ @@ -45,6 +47,8 @@ OBJECTS=atalk-utils.obj \ to_str.obj \ tvbuff.obj \ value_string.obj \ + $(DISSECTOR_OBJECTS) \ + $(DISSECTOR_SUPPORT_OBJECTS) all: ftypes dfilter ethereal.lib @@ -87,3 +91,45 @@ dfilter:: config.h cd dfilter $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake cd .. + +# +# 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. +# +# 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 name of the file to write. +# The second argument is the directory in which the source files live. +# All subsequent arguments are the files to scan. +# +# On Windows, however, that script runs slowly, as multiple greps +# and seds are run for each input file, so, if Python is present +# (as indicated by PYTHON being defined), we run a faster Python +# script to do that work instead. That script doesn't take the name +# of the file to write as an argument; it always writes to +# "register.c". +# +register.c: $(DISSECTOR_SRC) +!IFDEF PYTHON + @echo Making register.c (using python) + @$(PYTHON) ../make-reg-dotc.py . $(DISSECTOR_SRC) +!ELSE + @echo Making register.c (using sh) + @$(SH) ../make-reg-dotc register.c . $(DISSECTOR_SRC) +!ENDIF + diff --git a/epan/configure.in b/epan/configure.in index c590a1f0ea..e1bd5787a6 100644 --- a/epan/configure.in +++ b/epan/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.60 2004/02/23 21:53:05 gerald Exp $ +# $Id: configure.in,v 1.61 2004/03/02 01:21:56 jmayer Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -364,6 +364,13 @@ then AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled]) fi +AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes) +if test x$enable_static = xyes -a x$have_plugins = xyes +then + AC_DEFINE(ENABLE_STATIC, 1, [Link plugins statically into Ethereal]) +fi +AC_SUBST(ENABLE_STATIC) + AC_OUTPUT( Makefile dfilter/Makefile |