Allocate correct size of range.
[obnox/wireshark/wip.git] / plugins / Makefile.nmake
index 33be20ea21d47c7f50740ab44cdd38d2a80d43e9..d90971f4594b0e01b10f0d991bcdef1c118e0b30 100644 (file)
 
 include ..\config.nmake
 
-############### no need to modify below this line #########
+## To add a plugin: Add entry to PLUGIN_LIST
 
-all: \
-       agentx \
-       artnet \
-       asn1 \
-       ciscosm \
-       custom \
-       docsis \
-       enttec \
-       giop \
-       gryphon \
-       h223 \
-       irda \
-       lwres \
-       mate \
-       megaco \
-       mgcp \
-       opsi \
-       pcli \
-       profinet \
-       rlm \
-       rtnet \
-       rudp \
-       sbus \
-       stats_tree \
-       v5ua
+PLUGIN_LIST = \
+       asn1        \
+       docsis      \
+       ethercat    \
+       giop        \
+       gryphon     \
+       interlink   \
+       irda        \
+       m2m         \
+       mate        \
+       opcua       \
+       profinet    \
+       sercosiii   \
+       stats_tree  \
+       unistim     \
+       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 .. 
+all:
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET= process-plugins
 
-enttec::
-       cd enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
+clean: clean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=clean process-plugins
 
-giop::
-       cd giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
+distclean: distclean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=distclean process-plugins
 
-gryphon::
-       cd gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+maintainer-clean: maintainer-clean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=maintainer-clean process-plugins
 
-h223::
-       cd h223
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
 
-irda::
-       cd irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-lwres::
-       cd lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
-
-mate::
-       cd mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-megaco::
-       cd megaco
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-
-mgcp::
-       cd mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
-opsi::
-       cd opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+clean-local:
+       rm -rf $(VERSION)
 
-pcli:: 
-       cd pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+distclean-local: clean-local
 
-profinet:: 
-       cd profinet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+maintainer-clean-local: distclean-local
 
-rlm:: 
-       cd rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+checkapi:
+       $(MAKE) -f Makefile.nmake PLUGIN_TARGET=checkapi process-plugins 
 
-rtnet:: 
-       cd rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
 
-rudp:: 
-       cd rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
 
-sbus:: 
-       cd sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+process-plugins : $(PLUGIN_LIST) custom
 
-stats_tree:: 
-       cd stats_tree
-       $(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 ..
 
-v5ua:: 
-       cd v5ua
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+custom :
+       if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake $(PLUGIN_TARGET)
 
-clean:
-       rm -rf $(VERSION)
-       cd ../agentx
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../asn1
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../ciscosm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../h223
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../megaco
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../profinet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../stats_tree
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../v5ua
-       $(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 ../artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../asn1
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../ciscosm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../h223
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../megaco
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../profinet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../stats_tree
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../v5ua
-       $(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 ../artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../asn1
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../ciscosm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../enttec
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../h223
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../irda
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../mate
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../megaco
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../opsi
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../rlm
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../rudp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../sbus
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../stats_tree
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../v5ua
-       $(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 giop\*.dll $(VERSION) /d
-       xcopy gryphon\*.dll $(VERSION) /d
-       xcopy h223\*.dll $(VERSION) /d
-       xcopy irda\*.dll $(VERSION) /d
-       xcopy lwres\*.dll $(VERSION) /d
-       xcopy mate\*.dll $(VERSION) /d
-       xcopy megaco\*.dll $(VERSION) /d
-       xcopy mgcp\*.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 v5ua\*.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