Fix native virt-ctrl on Windows.
[virt-top.git] / Makefile.in
old mode 100755 (executable)
new mode 100644 (file)
index 703d14e..53a6829
@@ -20,6 +20,8 @@ VERSION               = @PACKAGE_VERSION@
 
 INSTALL                = @INSTALL@
 
+MAKENSIS       = @MAKENSIS@
+
 OCAMLDOC        = @OCAMLDOC@
 OCAMLDOCFLAGS  := -html -sort
 
@@ -37,7 +39,7 @@ clean:
        done
        rm -f examples/list_domains
        rm -f mlvirsh/mlvirsh
-       rm -f mlvirtmanager/mlvirtmanager
+       rm -f virt-ctrl/virt-ctrl
        rm -f virt-top/virt-top
        rm -f virt-df/virt-df
 
@@ -50,7 +52,7 @@ distclean: clean
        rm -f libvirt/Makefile
        rm -f examples/Makefile
        rm -f mlvirsh/Makefile
-       rm -f mlvirtmanager/Makefile
+       rm -f virt-ctrl/Makefile
        rm -f virt-top/Makefile
        rm -f virt-df/Makefile
 
@@ -65,6 +67,18 @@ doc:
          libvirt.{ml,mli} libvirt_version.{ml,mli}
 endif
 
+# Windows installer (requires NSIS).
+
+ifneq ($(MAKENSIS),)
+wininstaller: $(PACKAGE)-$(VERSION).exe
+
+$(PACKAGE)-$(VERSION).exe: wininstaller.nsis all opt
+       "$(MAKENSIS)" \
+         //DPACKAGE=$(PACKAGE) //DVERSION=$(VERSION) \
+         //DOUTFILE=$@ $<
+       ls -l $@
+endif
+
 # Update configure and rerun.
 
 configure: force