Applied my "bidirectional dt scaling" patch. Accordingly, the game can
[neverball] / Makefile.mingw
index 2439c6d..90147a2 100644 (file)
@@ -1,6 +1,7 @@
+export EXT= .exe
+
 #-----------------------------------------------------------------------------
 
-EXT= .exe
 include Makefile
 
 #-----------------------------------------------------------------------------
@@ -16,7 +17,11 @@ LIBS= \
 
 #-----------------------------------------------------------------------------
 
+INSTALLER= ../neverball-$(VERSION)-setup.exe
+
 MAKENSIS= makensis
+MAKENSIS_FLAGS= -DVERSION=$(VERSION) -DOUTFILE=$(INSTALLER)
+
 TODOS= todos
 FROMDOS= fromdos
 CP= cp
@@ -33,18 +38,18 @@ TXT_DOCS= $(TEXT_DOCS:%=%.txt)
 #-----------------------------------------------------------------------------
 
 .PHONY: setup
-setup: install-dlls convert-text-files all
-       $(MAKENSIS) -DVERSION=$(VERSION) -nocd scripts/neverball.nsi
+setup: $(INSTALLER)
 
-# Fails on MSYS due to a bug in the shipped version of make.
-# setup: LDFLAGS += -s
+$(INSTALLER): install-dlls convert-text-files all tools
+       $(MAKENSIS) $(MAKENSIS_FLAGS) -nocd scripts/neverball.nsi
 
-setup: LDFLAGS := $(LDFLAGS) -s
+$(INSTALLER): LDFLAGS := -s $(LDFLAGS)
 
 .PHONY: clean-setup
 clean-setup: clean
        $(RM) install-dlls.sh *.dll $(TXT_DOCS)
        find data -name "*.txt" -exec $(FROMDOS) {} \;
+       cd tools && $(MAKE) clean
 
 #-----------------------------------------------------------------------------
 
@@ -75,3 +80,8 @@ convert-text-files: $(TXT_DOCS)
 
 #-----------------------------------------------------------------------------
 
+.PHONY: tools
+tools:
+       cd tools && $(MAKE)
+
+#-----------------------------------------------------------------------------