2 # Automake file for wimaxasncp plugin
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 1998 Gerald Combs
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 include $(top_srcdir)/Makefile.am.inc
27 AM_CPPFLAGS = -I$(top_srcdir)
29 include Makefile.common
32 # XXX - how to make this apply only to clean files?
34 #if HAVE_WARNINGS_AS_ERRORS
38 plugindir = @plugindir@
40 plugin_LTLIBRARIES = wimaxasncp.la
42 wimaxasncp_la_SOURCES = \
48 wimaxasncp_la_LDFLAGS = -module -avoid-version
49 wimaxasncp_la_LIBADD = @PLUGIN_LIBS@
51 # Libs must be cleared, or else libtool won't create a shared module.
52 # If your module needs to be linked against any particular libraries,
57 # Build plugin.c, which contains the plugin version[] string, a
58 # function plugin_register() that calls the register routines for all
59 # protocols, and a function plugin_reg_handoff() that calls the handoff
60 # registration routines for all protocols.
62 # We do this by scanning sources. If that turns out to be too slow,
63 # maybe we could just require every .o file to have an register routine
64 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
66 # Formatting conventions: The name of the proto_register_* routines an
67 # proto_reg_handoff_* routines must start in column zero, or must be
68 # preceded only by "void " starting in column zero, and must not be
71 # REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
73 # For some unknown reason, having a big "for" loop in the Makefile
74 # to scan all the files doesn't work with some "make"s; they seem to
75 # pass only the first few names in the list to the shell, for some
78 # Therefore, we have a script to generate the plugin.c file.
79 # The shell script runs slowly, as multiple greps and seds are run
80 # for each input file; this is especially slow on Windows. Therefore,
81 # if Python is present (as indicated by PYTHON being defined), we run
82 # a faster Python script to do that work instead.
84 # The first argument is the directory in which the source files live.
85 # The second argument is "plugin", to indicate that we should build
86 # a plugin.c file for a plugin.
87 # All subsequent arguments are the files to scan.
89 plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
90 $(top_srcdir)/tools/make-dissector-reg.py
91 @if test -n "$(PYTHON)"; then \
92 echo Making plugin.c with python ; \
93 $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
94 plugin $(REGISTER_SRC_FILES) ; \
96 echo Making plugin.c with shell script ; \
97 $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
98 $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
102 # Currently plugin.c can be included in the distribution because
103 # we always build all protocol dissectors. We used to have to check
104 # whether or not to build the snmp dissector. If we again need to
105 # variably build something, making plugin.c non-portable, uncomment
106 # the dist-hook line below.
108 # Oh, yuk. We don't want to include "plugin.c" in the distribution, as
109 # its contents depend on the configuration, and therefore we want it
110 # to be built when the first "make" is done; however, Automake insists
111 # on putting *all* source into the distribution.
113 # We work around this by having a "dist-hook" rule that deletes
114 # "plugin.c", so that "dist" won't pick it up.
117 # @rm -f $(distdir)/plugin.c
123 MAINTAINERCLEANFILES = \
125 $(GENERATED_SRC_FILES) \
126 $(GENERATED_HEADER_FILES) \
137 RUNLEX = $(top_srcdir)/tools/runlex.sh
139 wimaxasncp_dict_lex.h: wimaxasncp_dict.c
141 wimaxasncp_dict.c: wimaxasncp_dict.h
144 # Install the wimaxasncp DTD and XML files in the "wimaxasncp"
145 # subdirectory of $(pkgdatadir)
147 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
150 $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
151 $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)