This is to test the waters.
[obnox/wireshark/wip.git] / plugins / h223 / Makefile.nmake
index 555ba3b9289875dd3dce442ffa7a39c5cf6faf92..716b2a445e11907b5ca7ebcbd62106ed04d489f0 100644 (file)
@@ -1,12 +1,11 @@
 # Makefile.nmake
-# nmake file for H.223 plugin
+# nmake file for Wireshark plugin
 #
 # $Id$
 #
 
 include ..\..\config.nmake
-
-############### no need to modify below this line #########
+include moduleinfo.nmake
 
 include Makefile.common
 
@@ -25,10 +24,20 @@ DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
 
 OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj
 
-$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
-       link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) \
-           $(LINK_PLUGIN_WITH) $(GLIB_LIBS)
+RESOURCE=$(PLUGIN_NAME).res
+
+$(PLUGIN_NAME).rc : moduleinfo.nmake
+       sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \
+       -e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \
+       -e s/@RC_VERSION@/$(RC_VERSION)/ \
+       -e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \
+       -e s/@PACKAGE@/$(PACKAGE)/ \
+       -e s/@VERSION@/$(VERSION)/ \
+       < plugin.rc.in > $@
 
+$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE)
+       link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
+       $(GLIB_LIBS) $(RESOURCE)
 #
 # Build plugin.c, which contains the plugin version[] string, a
 # function plugin_register() that calls the register routines for all
@@ -65,7 +74,7 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
 plugin.c: $(DISSECTOR_SRC)
 !IFDEF PYTHON
        @echo Making plugin.c (using python)
-       @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+       @$(PYTHON) ../../tools/make-dissector-reg.py . plugin $(DISSECTOR_SRC)
 !ELSE
        @echo Making plugin.c (using sh)
        @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
@@ -75,7 +84,7 @@ plugin.c: $(DISSECTOR_SRC)
 
 clean:
        rm -f $(OBJECTS) $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp \
-           $(PLUGIN_NAME).lib *.pdb
+           $(RESOURCE) $(PLUGIN_NAME).rc $(PLUGIN_NAME).lib *.pdb
 
 distclean: clean