5 # Ethereal - Network traffic analyzer
6 # By Gerald Combs <gerald@ethereal.com>
7 # Copyright 2004 Gerald Combs
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 noinst_LTLIBRARIES = libdissectors.la
25 INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/..
27 include Makefile.common
29 libdissectors_la_SOURCES = \
31 $(DISSECTOR_SUPPORT_SRC)
40 process-x11-fields.pl \
43 packet-ncp2222.c : $(srcdir)/ncp2222.py
47 # Build various header files for the X11 dissector.
49 PROC_X11_FIELDS = $(srcdir)/process-x11-fields.pl
50 X11_FIELDS = $(srcdir)/x11-fields
52 x11-declarations.h x11-register-info.h: $(PROC_X11_FIELDS) $(X11_FIELDS)
53 $(PERL) $(PROC_X11_FIELDS) < $(X11_FIELDS)
56 # Build "register.c", which contains a function "register_all_protocols()"
57 # that calls the register routines for all protocols.
59 # We do this by grepping through sources. If that turns out to be too slow,
60 # maybe we could just require every .o file to have an register routine
61 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
63 # Formatting conventions: The name of the proto_register_* routines must
64 # start in column zero, or must be preceded only by "void " starting in
65 # column zero, and must not be inside #if.
67 # We assume that all dissector routines are in "packet-XXX.c" files.
69 # For some unknown reason, having a big "for" loop in the Makefile
70 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
71 # they seem to pass only the first few names in the list to the shell,
74 # Therefore, we have a script to generate the "register.c" file.
76 # The first argument is the name of the file to write.
77 # The second argument is the directory in which the source files live.
78 # All subsequent arguments are the files to scan.
80 register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc $(srcdir)/make-reg-dotc.py
81 @if test -n $(PYTHON); then \
82 echo Making register.c with python ; \
83 $(PYTHON) $(srcdir)/make-reg-dotc.py $(srcdir) $(DISSECTOR_SRC) ; \
85 echo Making register.c with shell script ; \
86 $(srcdir)/make-reg-dotc register.c $(srcdir) \
87 $(plugin_src) $(DISSECTOR_SRC) ; \
91 # Currently register.c can be included in the distribution because
92 # we always build all protocol dissectors. We used to have to check
93 # whether or not to build the snmp dissector. If we again need to
94 # variably build something, making register.c non-portable, uncomment
95 # the dist-hook line below.
97 # Oh, yuk. We don't want to include "register.c" in the distribution, as
98 # its contents depend on the configuration, and therefore we want it
99 # to be built when the first "make" is done; however, Automake insists
100 # on putting *all* source into the distribution.
102 # We work around this by having a "dist-hook" rule that deletes
103 # "register.c", so that "dist" won't pick it up.
106 # @rm -f $(distdir)/register.c
109 MAINTAINERCLEANFILES = \
116 $(GENERATED_HEADER_FILES) \