Sharpen the description of preference names.
[obnox/wireshark/wip.git] / plugins / Makefile.nmake
index 1d48209e2fd698674bc80f5d09503baf95f100b1..259c5e1e2d1f28355925393d513164ab6c25d4e9 100644 (file)
 #
-# $Id: Makefile.nmake,v 1.25 2003/10/10 21:31:49 guy Exp $
+# $Id$
 #
 
 include ..\config.nmake
 
-############### no need to modify below this line #########
+## To add a plugin: Add entry to PLUGIN_LIST
 
-CFLAGS=/DHAVE_CONFIG_H /I.. /I../wiretap /I. $(GLIB_CFLAGS) \
-       /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+PLUGIN_LIST = \
+       asn1        \
+       docsis      \
+       ethercat    \
+       giop        \
+       gryphon     \
+       interlink   \
+       irda        \
+       m2m         \
+       mate        \
+       opcua       \
+       profinet    \
+       sercosiii   \
+       stats_tree  \
+       unistim     \
+       wimax       \
+       wimaxasncp
 
-OBJECTS=plugin_api.obj 
 
-all: $(OBJECTS) artnet docsis giop gryphon lwres megaco mgcp pcli rtnet
+all:
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET= process-plugins
 
-Xplugin_api.c: plugin_gen.py plugin_api_list.c
-       @echo **** Plugin api may be out of date, please generate new files:
-       @echo **** nmake -f Makefile.nmake xyzzy
-       @echo.
+clean: clean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=clean process-plugins
 
-plugin_api.obj: plugin_api.c Xplugin_api.c
+distclean: distclean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=distclean process-plugins
 
-xyzzy: plugin_gen.py plugin_api_list.c
-       gcc -aux-info xyzzy -DHAVE_CONFIG_H $(GCC_GLIB_CFLAGS) -I.. -c plugin_api_list.c
-       $(PYTHON) plugin_gen.py xyzzy
+maintainer-clean: maintainer-clean-local
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=maintainer-clean process-plugins
 
-artnet:: 
-       cd artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
 
-docsis::
-       cd docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
+clean-local:
+       rm -rf $(VERSION)
 
-giop::
-       cd giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
+distclean-local: clean-local
 
-gryphon::
-       cd gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+maintainer-clean-local: distclean-local
 
-lwres::
-       cd lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+checkapi:
+       $(MAKE) -f Makefile.nmake PLUGIN_TARGET=checkapi process-plugins 
 
-megaco::
-       cd megaco
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
 
-mgcp::
-       cd mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd .. 
 
-pcli:: 
-       cd pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
-       cd ..
+process-plugins : $(PLUGIN_LIST) custom
 
-rtnet:: 
-       cd rtnet
-       $(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 ..
 
-clean:
-       rm -f plugin_api.obj $(PDB_FILE)
-       cd artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../megaco
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       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).
+################################################################################
 
-distclean: clean
-       cd artnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../docsis
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../giop
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../gryphon
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../lwres
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../megaco
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../mgcp
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../pcli
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../rtnet
-       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+install-plugins:
+!IFDEF ENABLE_LIBWIRESHARK
        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