# Automake file for the EPAN library
# (Ethereal Protocol ANalyzer Library)
#
-# $Id: Makefile.am,v 1.47 2004/05/11 01:00:51 ulfl Exp $
+# $Id$
#
-# Ethereal - Network traffic analyzer
-# By Gerald Combs <gerald@ethereal.com>
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-SUBDIRS = ftypes dfilter
+
+if HAVE_LIBLUA
+wslua_lib = wslua/libwslua.la
+wslua_dir = wslua
+wslua_dist_dir =
+else # HAVE_LIBLUA
+wslua_lib =
+wslua_dir =
+wslua_dist_dir = wslua
+endif # HAVE_LIBLUA
+
+
+SUBDIRS = crypt ftypes dfilter dissectors $(wslua_dir)
+
+DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
# EPAN will eventually be a shared library. While I move source code around,
# however, it is an archive library.
ACLOCAL_AMFLAGS = `../aclocal-flags`
-lib_LTLIBRARIES = libethereal.la
-libethereal_la_LDFLAGS = -version-info 0:1:0
+lib_LTLIBRARIES = libwireshark.la
+libwireshark_la_LDFLAGS = -version-info 0:1:0 @SHAREDLIB_LDFLAGS@
include Makefile.common
-INCLUDES = -I$(srcdir)/..
-
-libethereal_la_SOURCES = \
- addr_and_mask.c \
- addr_and_mask.h \
- atalk-utils.c \
- atalk-utils.h \
- bitswap.c \
- bitswap.h \
- circuit.c \
- circuit.h \
- column_info.h \
- conversation.c \
- conversation.h \
- column-utils.c \
- column-utils.h \
- epan.c \
- epan.h \
- epan_dissect.h \
- except.c \
- except.h \
- exceptions.h \
- filesystem.c \
- filesystem.h \
- frame_data.c \
- frame_data.h \
- gdebug.h \
- int-64bit.c \
- int-64bit.h \
- ipv4.c \
- ipv4.h \
- ipv6-utils.h \
- nstime.h \
- osi-utils.c \
- osi-utils.h \
- packet.c \
- packet.h \
- packet_info.h \
- pint.h \
- plugins.c \
- plugins.h \
- proto.c \
- proto.h \
- resolv.c \
- resolv.h \
- report_err.h \
- slab.h \
- sna-utils.c \
- sna-utils.h \
- strutil.c \
- strutil.h \
- timestamp.c \
- timestamp.h \
- to_str.c \
- to_str.h \
- tvbuff.c \
- tvbuff.h \
- value_string.c \
- value_string.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC)
-
-EXTRA_libethereal_la_SOURCES = \
- inet_aton.c \
+INCLUDES = -I$(srcdir)/.. -I$(srcdir)/$(LEMON) @LUA_INCLUDES@ \
+ $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
+
+libwireshark_la_SOURCES = \
+ $(LIBWIRESHARK_SRC) \
+ $(LIBWIRESHARK_INCLUDES)
+
+EXTRA_libwireshark_la_SOURCES = \
+ g_ascii_strtoull.c \
+ g_ascii_strtoull.h \
+ inet_aton.c \
inet_pton.c \
inet_ntop.c \
inet_aton.h \
inet_v6defs.h
EXTRA_DIST = \
+ dtd_grammar.lemon \
+ dtd_parse.l \
+ dtd_preparse.l \
+ load_snmp_users_file.l \
+ enterprise-numbers \
+ libwireshark.def \
Makefile.common \
Makefile.nmake \
+ make-sminmpec.pl \
+ radius_dict.l \
tvbtest.c \
- doxygen.cfg
+ exntest.c \
+ doxygen.cfg.in
CLEANFILES = \
- libethereal.a \
- libethereal.la \
- x11-declarations.h \
- x11-register-info.h \
+ libwireshark.a \
+ libwireshark.la \
*~
-MAINTAINERCLEANFILES = \
- register.c \
- ../packet-ncp2222.c
+DISTCLEANFILES = \
+ dtd_grammar.out \
+ dtd_grammar.c \
+ dtd_grammar.h \
+ dtd_parse.c \
+ dtd_preparse.c \
+ load_snmp_users_file.c \
+ radius_dict.c
+
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ sminmpec.c
+
#
# Add the object files for missing routines, if any.
#
-libethereal_la_LIBADD = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ dfilter/libdfilter.la ftypes/libftypes.la @KRB5_LIBS@
-libethereal_la_DEPENDENCIES = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ dfilter/libdfilter.la ftypes/libftypes.la
+libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SNMP_LIBS@ @SSL_LIBS@ -lm
+libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la $(wslua_lib)
-../packet-ncp2222.c : $(srcdir)/../ncp2222.py
- $(PYTHON) $(srcdir)/../ncp2222.py -o $@
+tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o
+ $(LINK) $^ $(GLIB_LIBS) -lz
-tvbtest: tvbtest.o tvbuff.o except.o strutil.o
- $(LINK) -o tvbtest tvbtest.o tvbuff.o except.o strutil.o `glib-config --libs`
+exntest: exntest.o except.o
+ $(LINK) $^ $(GLIB_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
+radius_dict.c: radius_dict.l
+ $(LEX) $^
-#
-# 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
+load_snmp_users_file.c: load_snmp_users_file.l
+ $(LEX) -oload_snmp_users_file.c $(srcdir)/load_snmp_users_file.l
+
+dtd_parse.c : dtd_parse.l
+ $(LEX) -odtd_parse.c $(srcdir)/dtd_parse.l
-#
-# Build various header files for the X11 dissector.
-#
-x11-declarations.h x11-register-info.h: ../x11-fields ../process-x11-fields.pl
- $(PERL) $(srcdir)/../process-x11-fields.pl <$(srcdir)/../x11-fields
+dtd_preparse.c : dtd_preparse.l
+ $(LEX) -odtd_preparse.c $(srcdir)/dtd_preparse.l
+
+dtd_grammar.h: dtd_grammar.c
+
+LEMON=../tools/lemon
+
+dtd_grammar.c: dtd_grammar.lemon $(LEMON)/lemon$(EXEEXT)
+ $(LEMON)/lemon$(EXEEXT) t=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
+
+tvbtest.o exntest.o: exceptions.h
+
+sminmpec.c: enterprise-numbers make-sminmpec.pl
+ $(PERL) $(srcdir)/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.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 \
endif # HAVE_PLUGINS
+doxygen:
+if HAVE_DOXYGEN
+ $(DOXYGEN) doxygen.cfg
+endif # HAVE_DOXYGEN
+