MSWSP: append to proto column instaed of overwriting it
[wireshark-wip.git] / plugins / opcua / Makefile.am
blob1b1727f5963f54259dbb71faa85673d872deba78
1 # Makefile.am
2 # Automake file for OpcUa plugin
4 # $Id$
6 # Adapted by Gerhard Gappmeier for OpcUa
7 # Wireshark - Network traffic analyzer
8 # By Gerald Combs <gerald@wireshark.org>
9 # Copyright 1998 Gerald Combs
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 include $(top_srcdir)/Makefile.am.inc
28 AM_CPPFLAGS = -I$(top_srcdir)
30 include Makefile.common
32 if HAVE_WARNINGS_AS_ERRORS
33 AM_CFLAGS = -Werror
34 endif
36 plugindir = @plugindir@
38 plugin_LTLIBRARIES = opcua.la
40 opcua_la_SOURCES = \
41         plugin.c \
42         moduleinfo.h \
43         $(SRC_FILES)    \
44         $(HEADER_FILES)
46 opcua_la_LDFLAGS = -module -avoid-version
47 opcua_la_LIBADD = @PLUGIN_LIBS@
49 # Libs must be cleared, or else libtool won't create a shared module.
50 # If your module needs to be linked against any particular libraries,
51 # add them here.
52 LIBS =
55 # Build plugin.c, which contains the plugin version[] string, a
56 # function plugin_register() that calls the register routines for all
57 # protocols, and a function plugin_reg_handoff() that calls the handoff
58 # registration routines for all protocols.
60 # We do this by scanning sources.  If that turns out to be too slow,
61 # maybe we could just require every .o file to have an register routine
62 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
64 # Formatting conventions:  The name of the proto_register_* routines an
65 # proto_reg_handoff_* routines must start in column zero, or must be
66 # preceded only by "void " starting in column zero, and must not be
67 # inside #if.
69 # REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
71 # For some unknown reason, having a big "for" loop in the Makefile
72 # to scan all the files doesn't work with some "make"s; they seem to
73 # pass only the first few names in the list to the shell, for some
74 # reason.
76 # Therefore, we have a script to generate the plugin.c file.
77 # The shell script runs slowly, as multiple greps and seds are run
78 # for each input file; this is especially slow on Windows.  Therefore,
79 # if Python is present (as indicated by PYTHON being defined), we run
80 # a faster Python script to do that work instead.
82 # The first argument is the directory in which the source files live.
83 # The second argument is "plugin", to indicate that we should build
84 # a plugin.c file for a plugin.
85 # All subsequent arguments are the files to scan.
87 plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
88     $(top_srcdir)/tools/make-dissector-reg.py
89         @if test -n "$(PYTHON)"; then \
90                 echo Making plugin.c with python ; \
91                 $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
92                     plugin $(REGISTER_SRC_FILES) ; \
93         else \
94                 echo Making plugin.c with shell script ; \
95                 $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
96                     $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
97         fi
100 # Currently plugin.c can be included in the distribution because
101 # we always build all protocol dissectors. We used to have to check
102 # whether or not to build the snmp dissector. If we again need to
103 # variably build something, making plugin.c non-portable, uncomment
104 # the dist-hook line below.
106 # Oh, yuk.  We don't want to include "plugin.c" in the distribution, as
107 # its contents depend on the configuration, and therefore we want it
108 # to be built when the first "make" is done; however, Automake insists
109 # on putting *all* source into the distribution.
111 # We work around this by having a "dist-hook" rule that deletes
112 # "plugin.c", so that "dist" won't pick it up.
114 #dist-hook:
115 #       @rm -f $(distdir)/plugin.c
117 CLEANFILES = \
118         opcua \
119         *~
121 MAINTAINERCLEANFILES = \
122         Makefile.in     \
123         plugin.c
125 EXTRA_DIST = \
126         Makefile.common         \
127         Makefile.nmake          \
128         moduleinfo.nmake        \
129         plugin.rc.in            \
130         README                  \
131         CMakeLists.txt
133 checkapi:
134         $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
135                 $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)