2004-07-18 18:06:47 +00:00
|
|
|
# Makefile.am
|
|
|
|
#
|
2006-05-21 05:12:17 +00:00
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
2004-07-18 18:06:47 +00:00
|
|
|
# Copyright 2004 Gerald Combs
|
2009-09-12 23:02:34 +00:00
|
|
|
#
|
2004-07-18 18:06:47 +00:00
|
|
|
# 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.
|
2009-09-12 23:02:34 +00:00
|
|
|
#
|
2004-07-18 18:06:47 +00:00
|
|
|
# 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.
|
2009-09-12 23:02:34 +00:00
|
|
|
#
|
2004-07-18 18:06:47 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2013-06-21 00:08:20 +00:00
|
|
|
noinst_LTLIBRARIES = libdirtydissectors.la libfiledissectors.la libdissectors.la
|
2007-04-03 19:50:04 +00:00
|
|
|
|
2013-03-12 06:53:39 +00:00
|
|
|
AM_CPPFLAGS = -I$(srcdir)/../.. -I$(srcdir)/.. \
|
2006-08-31 13:14:48 +00:00
|
|
|
$(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
|
2004-07-18 18:06:47 +00:00
|
|
|
|
|
|
|
include Makefile.common
|
|
|
|
|
2008-08-26 03:45:42 +00:00
|
|
|
libdirtydissectors_la_SOURCES = \
|
2014-10-12 15:44:04 +00:00
|
|
|
$(DIRTY_ASN1_DISSECTOR_SRC)
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2007-04-03 19:50:04 +00:00
|
|
|
if HAVE_WARNINGS_AS_ERRORS
|
|
|
|
AM_CLEAN_CFLAGS = -Werror
|
|
|
|
endif
|
2007-04-13 00:50:23 +00:00
|
|
|
|
2013-06-21 00:08:20 +00:00
|
|
|
libfiledissectors_la_SOURCES = \
|
|
|
|
$(FILE_DISSECTOR_SRC)
|
|
|
|
|
2008-08-26 03:45:42 +00:00
|
|
|
libdissectors_la_SOURCES = \
|
|
|
|
$(DISSECTOR_SRC) \
|
|
|
|
$(ASN1_DISSECTOR_SRC) \
|
|
|
|
$(PIDL_DISSECTOR_SRC) \
|
2008-08-26 01:04:39 +00:00
|
|
|
$(DISSECTOR_SUPPORT_SRC)
|
2008-08-26 03:45:42 +00:00
|
|
|
libdissectors_la_CFLAGS = $(AM_CLEAN_CFLAGS)
|
2007-04-03 19:50:04 +00:00
|
|
|
|
2014-03-12 14:43:05 +00:00
|
|
|
# include dceprc and pidl in the source tarball. But nothing to build...
|
2010-05-18 15:58:49 +00:00
|
|
|
DIST_SUBDIRS = dcerpc pidl
|
2007-04-03 19:50:04 +00:00
|
|
|
|
2004-07-18 18:06:47 +00:00
|
|
|
EXTRA_DIST = \
|
2012-05-18 16:20:36 +00:00
|
|
|
Custom.common \
|
2004-10-22 02:05:53 +00:00
|
|
|
Makefile.common \
|
2004-07-20 16:58:11 +00:00
|
|
|
Makefile.nmake \
|
2009-09-12 23:02:34 +00:00
|
|
|
packet-ncp2222.inc \
|
|
|
|
README.X11 \
|
|
|
|
x11-fields
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2009-09-12 23:02:34 +00:00
|
|
|
packet-ncp2222.c : $(top_srcdir)/tools/ncp2222.py
|
2004-07-18 18:06:47 +00:00
|
|
|
$(PYTHON) $< -o $@
|
|
|
|
|
2009-09-12 23:02:34 +00:00
|
|
|
# Target to rebuild the X11 dissector header files.
|
|
|
|
# See README.X11 before using this--it requires the xcb and mesa source.
|
|
|
|
x11-dissector: $(top_srcdir)/tools/process-x11-fields.pl x11-fields $(top_srcdir)/tools/process-x11-xcb.pl
|
|
|
|
$(PERL) $(top_srcdir)/tools/process-x11-fields.pl < x11-fields
|
|
|
|
$(PERL) $(top_srcdir)/tools/process-x11-xcb.pl
|
|
|
|
|
2004-07-18 18:06:47 +00:00
|
|
|
#
|
2006-04-19 09:26:16 +00:00
|
|
|
# Build register.c, which contains a function register_all_protocols()
|
|
|
|
# that calls the register routines for all protocols and a function
|
|
|
|
# register_all_protocol_handoffs() that calls the handoff registration
|
|
|
|
# routines for all protocols.
|
2004-07-18 18:06:47 +00:00
|
|
|
#
|
2014-03-12 14:43:05 +00:00
|
|
|
# We do this by scanning through sources. If that turns out to be too slow,
|
2004-07-18 18:06:47 +00:00
|
|
|
# maybe we could just require every .o file to have an register routine
|
|
|
|
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
|
|
|
|
#
|
2014-03-12 14:43:05 +00:00
|
|
|
# Formatting conventions: The name of the proto_register_* routines an
|
2006-04-19 09:26:16 +00:00
|
|
|
# proto_reg_handoff_* routines must start in column zero, or must be
|
|
|
|
# preceded only by "void " starting in column zero, and must not be
|
|
|
|
# inside #if.
|
2004-07-18 18:06:47 +00:00
|
|
|
#
|
2008-08-26 03:45:42 +00:00
|
|
|
# ALL_DISSECTORS_SRC is assumed to have all the files that need to be scanned.
|
2004-07-18 18:06:47 +00:00
|
|
|
#
|
|
|
|
# For some unknown reason, having a big "for" loop in the Makefile
|
2006-04-19 09:26:16 +00:00
|
|
|
# to scan all the 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.
|
2004-07-18 18:06:47 +00:00
|
|
|
#
|
2014-06-27 18:10:28 +00:00
|
|
|
# Therefore, we use a script to generate the register.c file.
|
2006-04-19 09:26:16 +00:00
|
|
|
# The first argument is the directory in which the source files live.
|
|
|
|
# The second argument is "dissectors", to indicate that we should build
|
2006-05-31 00:23:01 +00:00
|
|
|
# a register.c file for libwireshark.
|
2004-07-18 18:06:47 +00:00
|
|
|
# All subsequent arguments are the files to scan.
|
|
|
|
#
|
2014-08-12 21:30:16 +00:00
|
|
|
register.c: $(plugin_src) $(ALL_DISSECTORS_SRC) Makefile.common Custom.common \
|
|
|
|
$(top_srcdir)/tools/make-dissector-reg.py
|
2014-08-14 00:30:25 +00:00
|
|
|
@echo Making register.c ; \
|
2014-08-12 21:30:16 +00:00
|
|
|
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
|
|
|
|
dissectors $(ALL_DISSECTORS_SRC) ;
|
2004-07-18 18:06:47 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2014-03-12 14:43:05 +00:00
|
|
|
# Oh, yuk. We don't want to include "register.c" in the distribution, as
|
2004-07-18 18:06:47 +00:00
|
|
|
# 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
|
|
|
|
|
2007-04-06 16:15:36 +00:00
|
|
|
# XXX - We may want to add register-cache.pkl to the distribution at
|
2014-03-12 14:43:05 +00:00
|
|
|
# some point. It should be portable across architectures.
|
2004-07-18 18:06:47 +00:00
|
|
|
CLEANFILES = \
|
2008-08-26 03:45:42 +00:00
|
|
|
libdissectors.a \
|
|
|
|
libdissectors.la \
|
|
|
|
libdirtydissectors.a \
|
|
|
|
libdirtydissectors.la \
|
|
|
|
register.c-tmp \
|
2007-04-06 16:15:36 +00:00
|
|
|
register-cache.pkl \
|
2004-07-27 02:52:49 +00:00
|
|
|
$(GENERATED_HEADER_FILES) \
|
2004-07-18 18:06:47 +00:00
|
|
|
*~
|
Make the "maintainer-clean" rules get rid of some additional generated
files. Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and
GENERATED_FILES macros in Makefile.common files, along the lines of what
wiretap/Makefile.common has.
Clean up "*~" files with "make clean" rather than only "make distclean"
in some additional places.
Add "maintainer-clean" rules to the Makefile.nmake files, paralelling
the ones in the automake-generated Makefile.in files, using the
GENERATED_FILES macros from Makefile.common files. In some cases, move
the cleanup of files from "make distclean" to "make maintainer-clean",
and in other cases, put in a comment indicating why we're not doing that
(because some files that are distributed in the source tarballs, namely
Flex output, were built with a UN*X Flex and won't compile on Windows,
so we get rid of them with "make distclean" so you can clean up stuff
that *has* to be re-generated for Windows).
Clean up some *CLEANFILES definitions - get rid of ones that no longer
apply as files were moved or that add to the definition a name that's
already there.
svn path=/trunk/; revision=13402
2005-02-14 20:33:57 +00:00
|
|
|
|
|
|
|
MAINTAINERCLEANFILES = \
|
2005-07-10 08:04:27 +00:00
|
|
|
$(GENERATED_FILES) \
|
|
|
|
Makefile.in
|
2010-11-30 02:04:55 +00:00
|
|
|
|
|
|
|
checkapi:
|
2014-04-23 08:50:27 +00:00
|
|
|
$(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
|
|
|
|
-sourcedir=$(srcdir) \
|
|
|
|
$(ALL_DISSECTORS_SRC) $(DISSECTOR_INCLUDES) $(DISSECTOR_SUPPORT_SRC)
|