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