aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-04-19 14:38:20 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-04-19 14:38:20 +0000
commitd726f26f4e81c80b3b9649619586fd0d90d64f9c (patch)
tree8fb51167ee937ea7e79d273c84ef5abd0b62ca55
parent6a104934a4a91a0621ee0937e94d777be1920fdb (diff)
Simplify Makefile.nmake so that adding a new plugin to Makefile.nmake
requires only adding the plugin (directory) name to a list of plugins. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32516 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--doc/README.plugins17
-rw-r--r--plugins/Makefile.nmake99
2 files changed, 37 insertions, 79 deletions
diff --git a/doc/README.plugins b/doc/README.plugins
index ece47891c3..e9df1858bf 100644
--- a/doc/README.plugins
+++ b/doc/README.plugins
@@ -89,7 +89,6 @@ You will also need to change the following files:
CMakeLists.txt
epan/Makefile.am
Makefile.am
- Makefile.nmake
packaging/nsis/Makefile.nmake
packaging/nsis/wireshark.nsi
plugins/Makefile.am
@@ -116,19 +115,9 @@ SUBDIRS = $(_CUSTOM_SUBDIRS_) \
3.2 Changes to plugins/Makefile.nmake
-To the Makefile.nmake you need to add the following (in
-alphabetical order) for your plugin to the process-plugins: rule
-
- cd xxx
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
-
-Then add a copy command to the install-plugins rule:
-
- ...
- xcopy plugins\xxx\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- cd plugins
- if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake install-plugins
+In plugins/Makefile.nmake you need to add to the PLUGINS_LIST
+(in alphabetical order) the name of your dissector (actually:
+the name of the plugins sub-directory which contains your dissector).
3.3 Changes to the top level Makefile.am
diff --git a/plugins/Makefile.nmake b/plugins/Makefile.nmake
index 28afef9984..c11868b542 100644
--- a/plugins/Makefile.nmake
+++ b/plugins/Makefile.nmake
@@ -4,7 +4,26 @@
include ..\config.nmake
-## To add a plugin: Add entry to process-plugins and to install-plugins
+## To add a plugin: Add entry to PLUGIN_LIST
+
+PLUGIN_LIST = \
+ asn1 \
+ docsis \
+ ethercat \
+ giop \
+ gryphon \
+ interlink \
+ irda \
+ m2m \
+ mate \
+ opcua \
+ profinet \
+ sercosiii \
+ stats_tree \
+ unistim \
+ wimax \
+ wimaxasncp
+
all:
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET= process-plugins
@@ -29,57 +48,19 @@ maintainer-clean-local: distclean-local
checkapi:
$(MAKE) -f Makefile.nmake PLUGIN_TARGET=checkapi process-plugins
-process-plugins:
- cd asn1
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd docsis
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd ethercat
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd giop
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd gryphon
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd interlink
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd irda
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd m2m
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd mate
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd opcua
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd profinet
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd sercosiii
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd stats_tree
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd unistim
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd wimax
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
- cd ..
- cd wimaxasncp
+
+
+process-plugins : $(PLUGIN_LIST) custom
+
+$(PLUGIN_LIST) : _FORCE_ # _FORCE_ req'd since each target actually exists
+ cd $@
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
cd ..
+
+custom :
if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake $(PLUGIN_TARGET)
+
################################################################################
# copy all plugins to $(INSTALL_DIR)/plugins/$(VERSION), so Wireshark will load them, when
# started from $(INSTALL_DIR).
@@ -87,26 +68,14 @@ process-plugins:
install-plugins:
!IFDEF ENABLE_LIBWIRESHARK
- cd..
- xcopy plugins\asn1\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\docsis\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\ethercat\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\giop\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\gryphon\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\interlink\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\irda\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\m2m\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\mate\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\opcua\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\profinet\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\sercosiii\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\stats_tree\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\unistim\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\wimax\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
- xcopy plugins\wimaxasncp\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
+ cd ..
+ @for %f in ( $(PLUGIN_LIST) ) do xcopy plugins\%f\*.dll $(INSTALL_DIR)\plugins\$(VERSION) /d
cd plugins
if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake install-plugins
!ENDIF
clean-deps:
+####
+_FORCE_: ## Assumption: no file named _FORCE_ exists in the current directory
+