From Matt Poduska via bug 1957 (with minor changes):
[obnox/wireshark/wip.git] / plugins / Makefile.nmake
1 #
2 # $Id$
3 #
4
5 include ..\config.nmake
6
7 ## To add a plugin: Add entry to PLUGIN_LIST
8
9 PLUGIN_LIST = \
10         asn1        \
11         docsis      \
12         ethercat    \
13         giop        \
14         gryphon     \
15         interlink   \
16         irda        \
17         llrp        \
18         m2m         \
19         mate        \
20         opcua       \
21         profinet    \
22         sercosiii   \
23         stats_tree  \
24         unistim     \
25         wimax       \
26         wimaxasncp
27
28
29 all:
30         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET= process-plugins
31
32 clean: clean-local
33         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=clean process-plugins
34
35 distclean: distclean-local
36         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=distclean process-plugins
37
38 maintainer-clean: maintainer-clean-local
39         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake PLUGIN_TARGET=maintainer-clean process-plugins
40
41
42 clean-local:
43         rm -rf $(VERSION)
44
45 distclean-local: clean-local
46
47 maintainer-clean-local: distclean-local
48
49 checkapi:
50         $(MAKE) -f Makefile.nmake PLUGIN_TARGET=checkapi process-plugins 
51
52
53
54 process-plugins : $(PLUGIN_LIST) custom
55
56 $(PLUGIN_LIST) : _FORCE_   # _FORCE_ req'd since each target actually exists
57         cd $@
58         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
59         cd ..
60
61 custom :
62         if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake $(PLUGIN_TARGET)
63
64
65 ################################################################################
66 # copy all plugins to $(INSTALL_DIR)/plugins/$(VERSION), so Wireshark will load them, when
67 # started from $(INSTALL_DIR).
68 ################################################################################
69
70 install-plugins:
71 !IFDEF ENABLE_LIBWIRESHARK
72         cd ..
73         @for %f in ( $(PLUGIN_LIST) ) do xcopy plugins\%f\*.dll  $(INSTALL_DIR)\plugins\$(VERSION) /d
74         cd plugins
75         if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake install-plugins
76 !ENDIF
77
78 clean-deps:
79         
80 ####
81 _FORCE_:  ## Assumption: no file named _FORCE_ exists in the current directory
82