summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-02-09 05:31:15 +0000
committerGuy Harris <guy@alum.mit.edu>2013-02-09 05:31:15 +0000
commite30d2b5001ae68f7d71e20f290f5a6116243994f (patch)
tree2d000509f1b77ca60727b9d7340df7b73128ad80
parent4aae84271d346f95a68225aefd84207aa4505679 (diff)
downloadwireshark-e30d2b5001ae68f7d71e20f290f5a6116243994f.tar.gz
Make the other plugin makefiles use the new style introduced in the MATE
makefiles. svn path=/trunk/; revision=47579
-rw-r--r--plugins/asn1/Makefile.am24
-rw-r--r--plugins/asn1/Makefile.common26
-rw-r--r--plugins/asn1/Makefile.nmake23
-rw-r--r--plugins/docsis/Makefile.am24
-rw-r--r--plugins/docsis/Makefile.common21
-rw-r--r--plugins/docsis/Makefile.nmake23
-rw-r--r--plugins/easy_codec/Makefile.common15
-rw-r--r--plugins/easy_codec/Makefile.nmake29
-rw-r--r--plugins/ethercat/Makefile.am22
-rw-r--r--plugins/ethercat/Makefile.common17
-rw-r--r--plugins/ethercat/Makefile.nmake25
-rw-r--r--plugins/gryphon/Makefile.am22
-rw-r--r--plugins/gryphon/Makefile.common20
-rw-r--r--plugins/gryphon/Makefile.nmake23
-rw-r--r--plugins/irda/Makefile.am28
-rw-r--r--plugins/irda/Makefile.common17
-rw-r--r--plugins/irda/Makefile.nmake21
-rw-r--r--plugins/m2m/Makefile.am22
-rw-r--r--plugins/m2m/Makefile.common15
-rw-r--r--plugins/m2m/Makefile.nmake23
-rw-r--r--plugins/opcua/Makefile.am22
-rw-r--r--plugins/opcua/Makefile.common38
-rw-r--r--plugins/opcua/Makefile.nmake23
-rw-r--r--plugins/profinet/Makefile.am22
-rw-r--r--plugins/profinet/Makefile.common22
-rw-r--r--plugins/profinet/Makefile.nmake29
-rw-r--r--plugins/stats_tree/Makefile.am14
-rw-r--r--plugins/stats_tree/Makefile.common12
-rw-r--r--plugins/stats_tree/Makefile.nmake14
-rw-r--r--plugins/unistim/Makefile.am22
-rw-r--r--plugins/unistim/Makefile.common16
-rw-r--r--plugins/unistim/Makefile.nmake23
-rw-r--r--plugins/wimax/Makefile.am23
-rw-r--r--plugins/wimax/Makefile.common32
-rw-r--r--plugins/wimax/Makefile.nmake24
-rw-r--r--plugins/wimaxasncp/Makefile.am38
-rw-r--r--plugins/wimaxasncp/Makefile.common30
-rw-r--r--plugins/wimaxasncp/Makefile.nmake65
-rw-r--r--plugins/wimaxmacphy/Makefile.am24
-rw-r--r--plugins/wimaxmacphy/Makefile.common20
-rw-r--r--plugins/wimaxmacphy/Makefile.nmake23
41 files changed, 571 insertions, 405 deletions
diff --git a/plugins/asn1/Makefile.am b/plugins/asn1/Makefile.am
index f23f3ae074..21aebd2229 100644
--- a/plugins/asn1/Makefile.am
+++ b/plugins/asn1/Makefile.am
@@ -22,7 +22,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -30,13 +32,16 @@ if HAVE_WARNINGS_AS_ERRORS
AM_CFLAGS = -Werror
endif
+plugindir = @plugindir@
+
plugin_LTLIBRARIES = asn1.la
+
asn1_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
asn1_la_LDFLAGS = -module -avoid-version
asn1_la_LIBADD = @PLUGIN_LIBS@
@@ -60,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -78,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -124,4 +129,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/asn1/Makefile.common b/plugins/asn1/Makefile.common
index 8f2dcc4d8d..45f0a8a46a 100644
--- a/plugins/asn1/Makefile.common
+++ b/plugins/asn1/Makefile.common
@@ -26,16 +26,24 @@
# the name of the plugin
PLUGIN_NAME = asn1
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-asn1.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES) \
+ asn1.c
+
+# Headers.
+CLEAN_HEADER_FILES = \
asn1.h
-# Dissector helpers. They're included in the source files in this
-# directory, but they're not dissectors themselves, i.e. they're not
-# used to generate "register.c").
-DISSECTOR_SUPPORT_SRC = \
- asn1.c
+HEADER_FILES = \
+ $(FLEX_GENERATED_HEADER_FILES) \
+ $(CLEAN_HEADER_FILES)
+
+NODIST_HEADER_FILES = \
+ $(LEMON_GENERATED_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/asn1/Makefile.nmake b/plugins/asn1/Makefile.nmake
index 075e7dbd8f..092616b58c 100644
--- a/plugins/asn1/Makefile.nmake
+++ b/plugins/asn1/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for ASN.1 plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -102,4 +100,5 @@ maintainer-clean: distclean
checkapi:
# TODO: Fix api's :)
-# $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/docsis/Makefile.am b/plugins/docsis/Makefile.am
index 07caec310e..1ff4b4b41f 100644
--- a/plugins/docsis/Makefile.am
+++ b/plugins/docsis/Makefile.am
@@ -22,7 +22,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -33,12 +35,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = docsis.la
+
docsis_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
docsis_la_LDFLAGS = -module -avoid-version
docsis_la_LIBADD = @PLUGIN_LIBS@
@@ -62,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -115,7 +118,7 @@ CLEANFILES = \
*~
MAINTAINERCLEANFILES = \
- Makefile.in \
+ Makefile.in \
plugin.c
EXTRA_DIST = \
@@ -127,4 +130,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/docsis/Makefile.common b/plugins/docsis/Makefile.common
index 4800415f22..ba7e1fcd79 100644
--- a/plugins/docsis/Makefile.common
+++ b/plugins/docsis/Makefile.common
@@ -26,8 +26,8 @@
# the name of the plugin
PLUGIN_NAME = docsis
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-bintrngreq.c \
packet-bpkmattr.c \
packet-bpkmreq.c \
@@ -73,6 +73,19 @@ DISSECTOR_SRC = \
packet-ucd.c \
packet-vendor.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES)
+
+# Headers.
+CLEAN_HEADER_FILES = \
packet-tlv.h
+
+HEADER_FILES = \
+ $(FLEX_GENERATED_HEADER_FILES) \
+ $(CLEAN_HEADER_FILES)
+
+NODIST_HEADER_FILES = \
+ $(LEMON_GENERATED_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/docsis/Makefile.nmake b/plugins/docsis/Makefile.nmake
index fecc441c15..6b6670acc4 100644
--- a/plugins/docsis/Makefile.nmake
+++ b/plugins/docsis/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for DOCSIS plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/easy_codec/Makefile.common b/plugins/easy_codec/Makefile.common
index be51658378..52e849f011 100644
--- a/plugins/easy_codec/Makefile.common
+++ b/plugins/easy_codec/Makefile.common
@@ -1,4 +1,4 @@
-# Makefile.common for stats tree plugin
+# Makefile.common for Easy codec plugin
# Contains the stuff from Makefile.am and Makefile.nmake that is
# a) common to both files and
# b) portable between both files
@@ -26,17 +26,24 @@
# the name of the plugin
PLUGIN_NAME = easy_codec
-# the codec sources
-CODEC_SRC = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
easy_codec_plugin.c \
codec-g729a.c \
codec-g7231.c \
codec-g722.c
-CODEC_INCLUDES = \
+# Headers.
+CLEAN_HEADER_FILES = \
codec-g729a.h \
codec-g7231.h \
codec-g722.h
+HEADER_FILES = \
+ $(FLEX_GENERATED_HEADER_FILES) \
+ $(CLEAN_HEADER_FILES)
+NODIST_HEADER_FILES = \
+ $(LEMON_GENERATED_HEADER_FILES)
+include ../Makefile.common.inc
diff --git a/plugins/easy_codec/Makefile.nmake b/plugins/easy_codec/Makefile.nmake
index 374c642f37..bb938259df 100644
--- a/plugins/easy_codec/Makefile.nmake
+++ b/plugins/easy_codec/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for codec_test plugin
+# nmake file for Easy codec plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -24,15 +26,13 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-CODEC_OBJECTS = $(CODEC_SRC:.c=.obj)
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
CODEC_LIBS = \
EasyG729A/EasyG729A.lib \
EasyG7231/EasyG7231.lib \
EasyG722/EasyG722.lib
-OBJECTS=$(CODEC_OBJECTS)
-
RESOURCE=$(PLUGIN_NAME).res
all: $(PLUGIN_NAME).dll
@@ -57,12 +57,27 @@ easy_codec_plugin.obj : easy_codec_plugin.c
!ENDIF
clean:
- rm -f $(OBJECTS) $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).exp \
- $(RESOURCE) $(PLUGIN_NAME).rc $(PLUGIN_NAME).lib *.pdb *.sbr
+ rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb *.sbr \
+ $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \
+ $(PLUGIN_NAME).exp $(PLUGIN_NAME).rc
+#
+# We remove the Flex-generated files with "distclean" because files
+# generated by Flex need different #includes for UN*X and Windows (UN*X
+# versions of Flex make it include <unistd.h>, but that's a UN*X-only
+# header), so if you're going to build from source, you need to re-generate
+# the files from the distribution that were generated by Flex.
+#
distclean: clean
+ rm -f $(FLEX_GENERATED_SRC_FILES) \
+ $(FLEX_GENERATED_HEADER_FILES) \
+ $(NODIST_GENERATED_SRC_FILES) \
+ $(NODIST_GENERATED_HEADER_FILES)
maintainer-clean: distclean
+ rm -f $(GENERATED_SRC_FILES) \
+ $(GENERATED_HEADER_FILES)
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/ethercat/Makefile.am b/plugins/ethercat/Makefile.am
index 5bd48737b0..35b644d0a3 100644
--- a/plugins/ethercat/Makefile.am
+++ b/plugins/ethercat/Makefile.am
@@ -22,7 +22,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -33,12 +35,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = ethercat.la
+
ethercat_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
ethercat_la_LDFLAGS = -module -avoid-version
ethercat_la_LIBADD = @PLUGIN_LIBS@
@@ -62,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -126,4 +129,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/ethercat/Makefile.common b/plugins/ethercat/Makefile.common
index 2f16450f7a..d5ac1dbccd 100644
--- a/plugins/ethercat/Makefile.common
+++ b/plugins/ethercat/Makefile.common
@@ -26,8 +26,8 @@
# the name of the plugin
PLUGIN_NAME = ethercat
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-ams.c \
packet-ecatmb.c \
packet-esl.c \
@@ -36,11 +36,20 @@ DISSECTOR_SRC = \
packet-ioraw.c \
packet-nv.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES)
+
+# Headers.
+CLEAN_HEADER_FILES = \
packet-ams.h \
packet-ecatmb.h \
packet-ethercat-datagram.h \
packet-ethercat-frame.h \
packet-ioraw.h \
packet-nv.h
+
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/ethercat/Makefile.nmake b/plugins/ethercat/Makefile.nmake
index 00b7212de2..4bea542dbe 100644
--- a/plugins/ethercat/Makefile.nmake
+++ b/plugins/ethercat/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for EtherCAT plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -42,7 +40,7 @@ $(PLUGIN_NAME).rc : moduleinfo.nmake
-e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \
< plugin.rc.in > $@
-$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE) $(DISSECTOR_INCLUDES)
+$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE)
link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS) $(RESOURCE)
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/gryphon/Makefile.am b/plugins/gryphon/Makefile.am
index 0571c70b09..f04591d392 100644
--- a/plugins/gryphon/Makefile.am
+++ b/plugins/gryphon/Makefile.am
@@ -24,7 +24,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -35,12 +37,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = gryphon.la
+
gryphon_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
gryphon_la_LDFLAGS = -module -avoid-version
gryphon_la_LIBADD = @PLUGIN_LIBS@
@@ -64,7 +67,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -82,16 +85,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -128,4 +131,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/gryphon/Makefile.common b/plugins/gryphon/Makefile.common
index 27cc866abb..b5d091092f 100644
--- a/plugins/gryphon/Makefile.common
+++ b/plugins/gryphon/Makefile.common
@@ -26,15 +26,19 @@
# the name of the plugin
PLUGIN_NAME = gryphon
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-gryphon.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES)
+
+# Headers.
+CLEAN_HEADER_FILES = \
packet-gryphon.h
-# Dissector helpers. They're included in the source files in this
-# directory, but they're not dissectors themselves, i.e. they're not
-# used to generate "plugin.c".
-DISSECTOR_SUPPORT_SRC =
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/gryphon/Makefile.nmake b/plugins/gryphon/Makefile.nmake
index fecc441c15..7befcfb3fa 100644
--- a/plugins/gryphon/Makefile.nmake
+++ b/plugins/gryphon/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for Gryphon plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/irda/Makefile.am b/plugins/irda/Makefile.am
index 8d1308f79a..b9a39c14b6 100644
--- a/plugins/irda/Makefile.am
+++ b/plugins/irda/Makefile.am
@@ -22,7 +22,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -33,12 +35,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = irda.la
+
irda_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
irda_la_LDFLAGS = -module -avoid-version
irda_la_LIBADD = @PLUGIN_LIBS@
@@ -62,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -114,8 +117,14 @@ CLEANFILES = \
irda \
*~
+DISTCLEANFILES = \
+ $(NODIST_SRC_FILES) \
+ $(NODIST_HEADER_FILES)
+
MAINTAINERCLEANFILES = \
Makefile.in \
+ $(GENERATED_SRC_FILES) \
+ $(GENERATED_HEADER_FILES) \
plugin.c
EXTRA_DIST = \
@@ -126,4 +135,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/irda/Makefile.common b/plugins/irda/Makefile.common
index 2c74b4e0ff..9897a2884a 100644
--- a/plugins/irda/Makefile.common
+++ b/plugins/irda/Makefile.common
@@ -26,12 +26,21 @@
# the name of the plugin
PLUGIN_NAME = irda
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-ircomm.c \
packet-irda.c \
packet-sir.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES)
+
+# Headers.
+CLEAN_HEADER_FILES = \
irda-appl.h
+
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/irda/Makefile.nmake b/plugins/irda/Makefile.nmake
index fecc441c15..33e87419de 100644
--- a/plugins/irda/Makefile.nmake
+++ b/plugins/irda/Makefile.nmake
@@ -5,6 +5,8 @@
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/m2m/Makefile.am b/plugins/m2m/Makefile.am
index 7de3da77c7..c1acf4a7f0 100644
--- a/plugins/m2m/Makefile.am
+++ b/plugins/m2m/Makefile.am
@@ -22,7 +22,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir) -I../wimax
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir) -I../wimax
include Makefile.common
@@ -33,12 +35,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = m2m.la
+
m2m_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
m2m_la_LDFLAGS = -module -avoid-version
m2m_la_LIBADD = @PLUGIN_LIBS@
@@ -62,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -126,4 +129,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/m2m/Makefile.common b/plugins/m2m/Makefile.common
index a212d49d04..677e3f448d 100644
--- a/plugins/m2m/Makefile.common
+++ b/plugins/m2m/Makefile.common
@@ -27,14 +27,13 @@
PLUGIN_NAME = m2m
# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-m2m.c
-# corresponding headers
-DISSECTOR_INCLUDES =
-
-# Dissector helpers. They're included in the source files in this
-# directory, but they're not dissectors themselves, i.e. they're not
-# used to generate "register.c").
-DISSECTOR_SUPPORT_SRC = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES) \
wimax_tlv.c
+
+include ../Makefile.common.inc
diff --git a/plugins/m2m/Makefile.nmake b/plugins/m2m/Makefile.nmake
index 9db71418a3..e676388e24 100644
--- a/plugins/m2m/Makefile.nmake
+++ b/plugins/m2m/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for M2M plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/opcua/Makefile.am b/plugins/opcua/Makefile.am
index 4f141b6a43..4fc4b6147f 100644
--- a/plugins/opcua/Makefile.am
+++ b/plugins/opcua/Makefile.am
@@ -23,7 +23,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -34,12 +36,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = opcua.la
+
opcua_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
opcua_la_LDFLAGS = -module -avoid-version
opcua_la_LIBADD = @PLUGIN_LIBS@
@@ -63,7 +66,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -81,16 +84,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -128,4 +131,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/opcua/Makefile.common b/plugins/opcua/Makefile.common
index 983939ca9e..04844b2148 100644
--- a/plugins/opcua/Makefile.common
+++ b/plugins/opcua/Makefile.common
@@ -27,12 +27,26 @@
# the name of the plugin
PLUGIN_NAME = opcua
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
opcua.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES) \
+ opcua_transport_layer.c \
+ opcua_security_layer.c \
+ opcua_application_layer.c \
+ opcua_serviceparser.c \
+ opcua_complextypeparser.c \
+ opcua_enumparser.c \
+ opcua_simpletypes.c \
+ opcua_servicetable.c \
+ opcua_extensionobjecttable.c \
+ opcua_hfindeces.c
+
+# Headers.
+CLEAN_HEADER_FILES = \
opcua_complextypeparser.h \
opcua_enumparser.h \
opcua_hfindeces.h \
@@ -45,15 +59,7 @@ DISSECTOR_INCLUDES = \
opcua_extensionobjectids.h \
opcua_serviceids.h
-# other sources
-DISSECTOR_SUPPORT_SRC = \
- opcua_transport_layer.c \
- opcua_security_layer.c \
- opcua_application_layer.c \
- opcua_serviceparser.c \
- opcua_complextypeparser.c \
- opcua_enumparser.c \
- opcua_simpletypes.c \
- opcua_servicetable.c \
- opcua_extensionobjecttable.c \
- opcua_hfindeces.c
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/opcua/Makefile.nmake b/plugins/opcua/Makefile.nmake
index fecc441c15..679be76032 100644
--- a/plugins/opcua/Makefile.nmake
+++ b/plugins/opcua/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for OpcUa plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/profinet/Makefile.am b/plugins/profinet/Makefile.am
index 7946d64b9f..4a932e50cb 100644
--- a/plugins/profinet/Makefile.am
+++ b/plugins/profinet/Makefile.am
@@ -22,7 +22,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -33,12 +35,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = profinet.la
+
profinet_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
profinet_la_LDFLAGS = -module -avoid-version
profinet_la_LIBADD = @PLUGIN_LIBS@
@@ -62,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -126,4 +129,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/profinet/Makefile.common b/plugins/profinet/Makefile.common
index 15fc474203..d3ce017461 100644
--- a/plugins/profinet/Makefile.common
+++ b/plugins/profinet/Makefile.common
@@ -26,8 +26,8 @@
# the name of the plugin
PLUGIN_NAME = profinet
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-dcerpc-pn-io.c \
packet-dcom-cba.c \
packet-dcom-cba-acco.c \
@@ -37,13 +37,17 @@ DISSECTOR_SRC = \
packet-pn-ptcp.c \
packet-pn-rt.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES) \
+ packet-pn.c
+
+# Headers.
+CLEAN_HEADER_FILES = \
packet-dcom-cba-acco.h \
packet-pn.h
-# Dissector helpers. They're included in the source files in this
-# directory, but they're not dissectors themselves, i.e. they're not
-# used to generate "register.c").
-DISSECTOR_SUPPORT_SRC = \
- packet-pn.c
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/profinet/Makefile.nmake b/plugins/profinet/Makefile.nmake
index 749b802db7..f99053c952 100644
--- a/plugins/profinet/Makefile.nmake
+++ b/plugins/profinet/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for PROFINET plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -19,14 +21,10 @@ CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
LDFLAGS = $(PLUGIN_LDFLAGS)
!IFDEF ENABLE_LIBWIRESHARK
-LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
+LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -42,8 +40,8 @@ $(PLUGIN_NAME).rc : moduleinfo.nmake
-e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \
< plugin.rc.in > $@
-$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) ..\..\wsutil\libwsutil.lib $(RESOURCE)
- link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) ..\..\wsutil\libwsutil.lib \
+$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE)
+ link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS) $(RESOURCE)
#
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/stats_tree/Makefile.am b/plugins/stats_tree/Makefile.am
index c5092e5501..e33efafebd 100644
--- a/plugins/stats_tree/Makefile.am
+++ b/plugins/stats_tree/Makefile.am
@@ -22,6 +22,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
+include $(top_srcdir)/Makefile.am.inc
+
INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -33,7 +35,11 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = stats_tree.la
-stats_tree_la_SOURCES = $(TAP_SRC) $(TAP_INCLUDES)
+
+stats_tree_la_SOURCES = \
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
stats_tree_la_LDFLAGS = -module -avoid-version
stats_tree_la_LIBADD = @PLUGIN_LIBS@
@@ -47,8 +53,7 @@ CLEANFILES = \
*~
MAINTAINERCLEANFILES = \
- Makefile.in \
- plugin.c
+ Makefile.in
EXTRA_DIST = \
Makefile.common \
@@ -58,4 +63,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(TAP_SRC) $(TAP_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/stats_tree/Makefile.common b/plugins/stats_tree/Makefile.common
index e81f4f4754..da461d8097 100644
--- a/plugins/stats_tree/Makefile.common
+++ b/plugins/stats_tree/Makefile.common
@@ -26,11 +26,17 @@
# the name of the plugin
PLUGIN_NAME = stats_tree
-# the tap sources
-TAP_SRC = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES) \
stats_tree_plugin.c \
pinfo_stats_tree.c
-TAP_INCLUDES = \
+# Headers.
+CLEAN_HEADER_FILES = \
pinfo_stats_tree.h
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/stats_tree/Makefile.nmake b/plugins/stats_tree/Makefile.nmake
index a600a68a86..8d46eea541 100644
--- a/plugins/stats_tree/Makefile.nmake
+++ b/plugins/stats_tree/Makefile.nmake
@@ -5,6 +5,8 @@
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,9 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-TAP_OBJECTS = $(TAP_SRC:.c=.obj)
-
-OBJECTS=$(TAP_OBJECTS)
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -47,12 +47,14 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
!ENDIF
clean:
- rm -f $(OBJECTS) $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).exp \
- $(RESOURCE) $(PLUGIN_NAME).rc $(PLUGIN_NAME).lib *.pdb *.sbr
+ rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb *.sbr \
+ $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \
+ $(PLUGIN_NAME).exp $(PLUGIN_NAME).rc
distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(TAP_SRC) $(TAP_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/unistim/Makefile.am b/plugins/unistim/Makefile.am
index eb5d1ed48b..32974faa31 100644
--- a/plugins/unistim/Makefile.am
+++ b/plugins/unistim/Makefile.am
@@ -23,7 +23,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -34,12 +36,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = unistim.la
+
unistim_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
unistim_la_LDFLAGS = -module -avoid-version
unistim_la_LIBADD = @PLUGIN_LIBS@
@@ -63,7 +66,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -81,16 +84,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -128,4 +131,5 @@ EXTRA_DIST = \
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/unistim/Makefile.common b/plugins/unistim/Makefile.common
index 873fd1f30f..e0b8bde53c 100644
--- a/plugins/unistim/Makefile.common
+++ b/plugins/unistim/Makefile.common
@@ -27,11 +27,16 @@
# the name of the plugin
PLUGIN_NAME = unistim
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-unistim.c
-DISSECTOR_INCLUDES = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES)
+
+# Headers.
+CLEAN_HEADER_FILES = \
audio.h \
basic.h \
broadcast.h \
@@ -42,3 +47,8 @@ DISSECTOR_INCLUDES = \
network.h \
uftp.h \
packet-unistim.h
+
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/unistim/Makefile.nmake b/plugins/unistim/Makefile.nmake
index fecc441c15..52994732ff 100644
--- a/plugins/unistim/Makefile.nmake
+++ b/plugins/unistim/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for Unistim plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/wimax/Makefile.am b/plugins/wimax/Makefile.am
index 20bbe2141e..52d3509d18 100644
--- a/plugins/wimax/Makefile.am
+++ b/plugins/wimax/Makefile.am
@@ -22,7 +22,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
@@ -33,12 +35,13 @@ endif
plugindir = @plugindir@
plugin_LTLIBRARIES = wimax.la
+
wimax_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
wimax_la_LDFLAGS = -module -avoid-version
wimax_la_LIBADD = @PLUGIN_LIBS@
@@ -62,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -127,6 +130,4 @@ EXTRA_DIST = \
checkapi:
$(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_INCLUDES) \
- $(DISSECTOR_SUPPORT_SRC)
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/wimax/Makefile.common b/plugins/wimax/Makefile.common
index 4b9d5bbc9f..dae7d681b7 100644
--- a/plugins/wimax/Makefile.common
+++ b/plugins/wimax/Makefile.common
@@ -26,22 +26,13 @@
# the name of the plugin
PLUGIN_NAME = wimax
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-wmx.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
- crc.h \
- wimax_bits.h \
- wimax_mac.h \
- wimax_tlv.h \
- wimax_utils.h
-
-# Dissector helpers. They're included in the source files in this
-# directory, but they're not dissectors themselves, i.e. they're not
-# used to generate "register.c").
-DISSECTOR_SUPPORT_SRC = \
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES) \
wimax_ffb_decoder.c \
wimax_fch_decoder.c \
wimax_pdu_decoder.c \
@@ -83,3 +74,16 @@ DISSECTOR_SUPPORT_SRC = \
crc.c \
crc_data.c \
wimax_tlv.c
+
+# Headers.
+CLEAN_HEADER_FILES = \
+ crc.h \
+ wimax_bits.h \
+ wimax_mac.h \
+ wimax_tlv.h \
+ wimax_utils.h
+
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+include ../Makefile.common.inc
diff --git a/plugins/wimax/Makefile.nmake b/plugins/wimax/Makefile.nmake
index 7fec13f193..12b3ecf8b6 100644
--- a/plugins/wimax/Makefile.nmake
+++ b/plugins/wimax/Makefile.nmake
@@ -1,10 +1,12 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for WiMAX plugin
#
# $Id$
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -102,6 +100,4 @@ maintainer-clean: distclean
checkapi:
$(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_INCLUDES) \
- $(DISSECTOR_SUPPORT_SRC)
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/wimaxasncp/Makefile.am b/plugins/wimaxasncp/Makefile.am
index f7f0abbb97..1ccc3c72be 100644
--- a/plugins/wimaxasncp/Makefile.am
+++ b/plugins/wimaxasncp/Makefile.am
@@ -22,26 +22,29 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# lex rules
include $(top_srcdir)/Makefile.am.inc
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+INCLUDES = -I$(top_srcdir)
include Makefile.common
-if HAVE_WARNINGS_AS_ERRORS
-# AM_CFLAGS = -Werror
-endif
+#
+# XXX - how to make this apply only to clean files?
+#
+#if HAVE_WARNINGS_AS_ERRORS
+#AM_CFLAGS = -Werror
+#endif
plugindir = @plugindir@
plugin_LTLIBRARIES = wimaxasncp.la
+
wimaxasncp_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
wimaxasncp_la_LDFLAGS = -module -avoid-version
wimaxasncp_la_LIBADD = @PLUGIN_LIBS@
@@ -65,7 +68,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -83,16 +86,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -119,16 +122,16 @@ CLEANFILES = \
MAINTAINERCLEANFILES = \
Makefile.in \
- wimaxasncp_dict.c \
- wimaxasncp_dict_lex.h \
+ $(GENERATED_SRC_FILES) \
+ $(GENERATED_HEADER_FILES) \
plugin.c
EXTRA_DIST = \
- wimaxasncp_dict.l \
Makefile.common \
Makefile.nmake \
moduleinfo.nmake \
plugin.rc.in \
+ wimaxasncp_dict.l \
CMakeLists.txt
RUNLEX = $(top_srcdir)/tools/runlex.sh
@@ -141,9 +144,8 @@ wimaxasncp_dict.c: wimaxasncp_dict.h
# Install the wimaxasncp DTD and XML files in the "wimaxasncp"
# subdirectory of $(pkgdatadir)
#
-
wimaxasncpdir = $(pkgdatadir)/wimaxasncp
-
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/wimaxasncp/Makefile.common b/plugins/wimaxasncp/Makefile.common
index 6b394d94ee..e8ab38a939 100644
--- a/plugins/wimaxasncp/Makefile.common
+++ b/plugins/wimaxasncp/Makefile.common
@@ -26,19 +26,29 @@
# the name of the plugin
PLUGIN_NAME = wimaxasncp
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+#
+# Files generated by Flex.
+#
+FLEX_GENERATED_C_FILES = \
+ wimaxasncp_dict.c
+
+FLEX_GENERATED_HEADER_FILES = \
+ wimaxasncp_dict_lex.h
+
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-wimaxasncp.c
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES)
+
# corresponding headers
-DISSECTOR_INCLUDES = \
- wimaxasncp_dict_lex.h \
+CLEAN_HEADER_FILES = \
wimaxasncp_dict.h
-# Dissector helpers. They're included in the source files in this
-# directory, but they're not dissectors themselves, i.e. they're not
-# used to generate "register.c").
-DISSECTOR_SUPPORT_SRC = \
- wimaxasncp_dict.c
-
+HEADER_FILES = \
+ $(FLEX_GENERATED_HEADER_FILES) \
+ $(CLEAN_HEADER_FILES)
+include ../Makefile.common.inc
diff --git a/plugins/wimaxasncp/Makefile.nmake b/plugins/wimaxasncp/Makefile.nmake
index cc42df4172..ebca1697fd 100644
--- a/plugins/wimaxasncp/Makefile.nmake
+++ b/plugins/wimaxasncp/Makefile.nmake
@@ -1,22 +1,23 @@
# Makefile.nmake
-# nmake file for Wireshark plugin
+# nmake file for wimaxasncp plugin
#
# $Id$
#
include ..\..\config.nmake
-include moduleinfo.nmake
include ..\..\Makefile.nmake.inc
+include moduleinfo.nmake
+
include Makefile.common
-# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=\
+# We use DIRTY_CFLAGS to get around flex's non-LLP64-compliant output
+DIRTY_CFLAGS=\
$(STANDARD_CFLAGS) \
- /I../.. $(GLIB_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) /I$(LEMON) \
/I$(PCAP_DIR)\include
-CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(DIRTY_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
@@ -27,11 +28,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -66,7 +63,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -85,33 +82,51 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES) $(NODIST_REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES) $(NODIST_REGISTER_SRC_FILES)
!ENDIF
!ENDIF
-
-RUNLEX = ..\..\tools\runlex.sh
-
-wimaxasncp_dict_lex.h : wimaxasncp_dict.c
-wimaxasncp_dict.obj : wimaxasncp_dict.c
- $(CC) $(GENERATED_CFLAGS) -Fd.\ -c $?
-
clean:
rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb *.sbr \
$(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \
$(PLUGIN_NAME).exp $(PLUGIN_NAME).rc
+#
+# We remove the Flex-generated files with "distclean" because files
+# generated by Flex need different #includes for UN*X and Windows (UN*X
+# versions of Flex make it include <unistd.h>, but that's a UN*X-only
+# header), so if you're going to build from source, you need to re-generate
+# the files from the distribution that were generated by Flex.
+#
distclean: clean
- rm -f wimaxasncp_dict.c wimaxasncp_dict_lex.h
+ rm -f $(FLEX_GENERATED_SRC_FILES) \
+ $(FLEX_GENERATED_HEADER_FILES)
maintainer-clean: distclean
+RUNLEX = ..\..\tools\runlex.sh
+
+#
+# In order to generate wimaxasncp_dict_lex.h, we need to run Flex on
+# wimaxasncp_dict.l; that's done by generating wimaxasncp_dict.c.
+#
+wimaxasncp_dict_lex.h : wimaxasncp_dict.c
+
+#
+# We compile this specially because it's Flex-generated and thus
+# "warnings are errors" will fail because there's a bunch of
+# warnings we can't eliminate.
+#
+wimaxasncp_dict.obj : wimaxasncp_dict.c
+ $(CC) $(DIRTY_CFLAGS) -Fd.\ -c $?
+
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/wimaxmacphy/Makefile.am b/plugins/wimaxmacphy/Makefile.am
index 686377b8eb..af04d4747f 100644
--- a/plugins/wimaxmacphy/Makefile.am
+++ b/plugins/wimaxmacphy/Makefile.am
@@ -22,23 +22,26 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-INCLUDES = -I$(top_srcdir) -I$(includedir)
+include $(top_srcdir)/Makefile.am.inc
+
+INCLUDES = -I$(top_srcdir)
include Makefile.common
if HAVE_WARNINGS_AS_ERRORS
-# AM_CFLAGS = -Werror
+AM_CFLAGS = -Werror
endif
plugindir = @plugindir@
plugin_LTLIBRARIES = wimaxmacphy.la
+
wimaxmacphy_la_SOURCES = \
plugin.c \
moduleinfo.h \
- $(DISSECTOR_SRC) \
- $(DISSECTOR_SUPPORT_SRC) \
- $(DISSECTOR_INCLUDES)
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
wimaxmacphy_la_LDFLAGS = -module -avoid-version
wimaxmacphy_la_LIBADD = @PLUGIN_LIBS@
@@ -62,7 +65,7 @@ LIBS =
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,16 +83,16 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(DISSECTOR_SRC) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
$(top_srcdir)/tools/make-dissector-reg.py
@if test -n "$(PYTHON)"; then \
echo Making plugin.c with python ; \
$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(DISSECTOR_SRC) ; \
+ plugin $(REGISTER_SRC_FILES) ; \
else \
echo Making plugin.c with shell script ; \
$(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(DISSECTOR_SRC) ; \
+ $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
fi
#
@@ -126,4 +129,5 @@ EXTRA_DIST = \
CMakeLists.txt
checkapi:
- $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)
diff --git a/plugins/wimaxmacphy/Makefile.common b/plugins/wimaxmacphy/Makefile.common
index 1c292cc3fd..fad13376b7 100644
--- a/plugins/wimaxmacphy/Makefile.common
+++ b/plugins/wimaxmacphy/Makefile.common
@@ -26,17 +26,19 @@
# the name of the plugin
PLUGIN_NAME = wimaxmacphy
-# the dissector sources (without any helpers)
-DISSECTOR_SRC = \
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
packet-wimaxmacphy.c
-# corresponding headers
-DISSECTOR_INCLUDES = \
- packet-wimaxmacphy.h
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES)
-# Dissector helpers. They're included in the source files in this
-# directory, but they're not dissectors themselves, i.e. they're not
-# used to generate "register.c").
-DISSECTOR_SUPPORT_SRC =
+# Headers.
+CLEAN_HEADER_FILES = \
+ packet-wimaxmacphy.h
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+include ../Makefile.common.inc
diff --git a/plugins/wimaxmacphy/Makefile.nmake b/plugins/wimaxmacphy/Makefile.nmake
index 1091208a5f..9b830a1cc2 100644
--- a/plugins/wimaxmacphy/Makefile.nmake
+++ b/plugins/wimaxmacphy/Makefile.nmake
@@ -5,6 +5,8 @@
#
include ..\..\config.nmake
+include ..\..\Makefile.nmake.inc
+
include moduleinfo.nmake
include Makefile.common
@@ -22,11 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
-
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
-
-OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
+OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -42,7 +40,7 @@ $(PLUGIN_NAME).rc : moduleinfo.nmake
-e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \
< plugin.rc.in > $@
-$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE) $(DISSECTOR_INCLUDES)
+$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE)
link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS) $(RESOURCE)
@@ -61,7 +59,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# REGISTER_SRC_FILES is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -80,13 +78,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(REGISTER_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(REGISTER_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(REGISTER_SRC_FILES)
!ENDIF
!ENDIF
@@ -101,4 +99,5 @@ distclean: clean
maintainer-clean: distclean
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES)