From Matt Poduska via bug 1957 (with minor changes):
[obnox/wireshark/wip.git] / plugins / Makefile.nmake
index 539f38fcba7204de4b4e3539cca73641650bc359..66fee75b4a948645d4127a72226361f6c94b0c46 100644 (file)
 
 include ..\config.nmake
 
-############### no need to modify below this line #########
-
-all: \
-       agentx \
-       artnet \
-       asn1 \
-       ciscosm \
-       custom \
-       docsis \
-       enttec \
-       ethercat \
-       giop \
-       gryphon \
-       irda \
-       lwres \
-       m2m \
-       mate \
-       mgcp \
-       opcua \
-       opsi \
-       pcli \
-       profinet \
-       rlm \
-       rtnet \
-       rudp \
-       sbus \
-       stats_tree \
-       unistim \
-       v5ua \
-       wimax \
-        wimaxasncp
-
-
-agentx:: 
-       cd agentx
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-artnet:: 
-       cd artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-asn1:: 
-       cd asn1
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-ciscosm:: 
-       cd ciscosm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-custom:: 
-       if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake
-
-docsis::
-       cd docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-enttec::
-       cd enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-ethercat::
-       cd ethercat
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-giop::
-       cd giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-gryphon::
-       cd gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-irda::
-       cd irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-lwres::
-       cd lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-m2m::
-       cd m2m
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-mate::
-       cd mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-mgcp::
-       cd mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-opcua::
-       cd opcua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-opsi::
-       cd opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-pcli:: 
-       cd pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-profinet:: 
-       cd profinet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+## To add a plugin: Add entry to PLUGIN_LIST
+
+PLUGIN_LIST = \
+       asn1        \
+       docsis      \
+       ethercat    \
+       giop        \
+       gryphon     \
+       interlink   \
+       irda        \
+       llrp        \
+       m2m         \
+       mate        \
+       opcua       \
+       profinet    \
+       sercosiii   \
+       stats_tree  \
+       unistim     \
+       wimax       \
+       wimaxasncp
+
+
+all:
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET= process-plugins
+
+clean: clean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=clean process-plugins
+
+distclean: distclean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=distclean process-plugins
+
+maintainer-clean: maintainer-clean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=maintainer-clean process-plugins
+
+
+clean-local:
+       rm -rf $(VERSION)
 
-rlm:: 
-       cd rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+distclean-local: clean-local
 
-rtnet:: 
-       cd rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+maintainer-clean-local: distclean-local
 
-rudp:: 
-       cd rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+checkapi:
+       $(MAKE) -f Makefile.nmake PLUGIN_TARGET=checkapi process-plugins 
 
-sbus:: 
-       cd sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
 
-stats_tree:: 
-       cd stats_tree
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
 
-unistim:: 
-       cd unistim
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+process-plugins : $(PLUGIN_LIST) custom
 
-v5ua:: 
-       cd v5ua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
+$(PLUGIN_LIST) : _FORCE_   # _FORCE_ req'd since each target actually exists
+       cd $@
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
        cd ..
 
-wimax:: 
-       cd wimax
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+custom :
+       if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake $(PLUGIN_TARGET)
 
-wimaxasncp::
-        cd wimaxasncp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-clean:
-       rm -rf $(VERSION)
-       cd agentx
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd asn1
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd ciscosm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd ethercat
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd m2m
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd opcua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd profinet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd stats_tree
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd unistim
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd v5ua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd wimax
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       cd wimaxasncp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ..
-       if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake clean
-
-distclean: clean
-       cd agentx
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd asn1
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd ciscosm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd ethercat
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd m2m
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd opcua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd profinet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd stats_tree
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd unistim
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd v5ua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd wimax
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       cd wimaxasncp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ..
-       if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake distclean
-
-maintainer-clean: distclean
-       cd agentx
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd asn1
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd ciscosm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd ethercat
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd m2m
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd opcua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd stats_tree
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd unistim
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd v5ua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd wimax
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       cd wimaxasncp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ..
-       if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake maintainer-clean
 
 ################################################################################
-# copy all plugins to /plugins/$(VERSION), so Wireshark will load them, when
-# started from within the source tree.
+# copy all plugins to $(INSTALL_DIR)/plugins/$(VERSION), so Wireshark will load them, when
+# started from $(INSTALL_DIR).
 ################################################################################
 
 install-plugins:
 !IFDEF ENABLE_LIBWIRESHARK
-       rm -rf $(VERSION)
-       mkdir $(VERSION)
-       xcopy agentx\*.dll $(VERSION) /d
-       xcopy artnet\*.dll $(VERSION) /d
-       xcopy asn1\*.dll $(VERSION) /d
-       xcopy ciscosm\*.dll $(VERSION) /d
-       xcopy docsis\*.dll $(VERSION) /d
-       xcopy enttec\*.dll $(VERSION) /d
-       xcopy ethercat\*.dll $(VERSION) /d
-       xcopy giop\*.dll $(VERSION) /d
-       xcopy gryphon\*.dll $(VERSION) /d
-       xcopy irda\*.dll $(VERSION) /d
-       xcopy lwres\*.dll $(VERSION) /d
-       xcopy m2m\*.dll $(VERSION) /d
-       xcopy mate\*.dll $(VERSION) /d
-       xcopy mgcp\*.dll $(VERSION) /d
-       xcopy opcua\*.dll $(VERSION) /d
-       xcopy opsi\*.dll $(VERSION) /d
-       xcopy pcli\*.dll $(VERSION) /d
-       xcopy profinet\*.dll $(VERSION) /d
-       xcopy rlm\*.dll $(VERSION) /d
-       xcopy rtnet\*.dll $(VERSION) /d
-       xcopy rudp\*.dll $(VERSION) /d
-       xcopy sbus\*.dll $(VERSION) /d
-       xcopy stats_tree\*.dll $(VERSION) /d
-       xcopy unistim\*.dll $(VERSION) /d
-       xcopy v5ua\*.dll $(VERSION) /d
-       xcopy wimax\*.dll $(VERSION) /d
-       xcopy wimaxasncp\*.dll $(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:
-       rm -rf $(VERSION)
-
-
+       
+####
+_FORCE_:  ## Assumption: no file named _FORCE_ exists in the current directory