Fixed a problem with Makefile.mingw where make wasn't rebuilding targets
[neverball] / Makefile
index d7e0163..fbb726e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,13 @@
 
+#-------------------------------------------------------------------------------
+
+#VERSION=1.5.0
+VERSION= $(shell sh scripts/version.sh)
+
+ifeq ($(VERSION),)
+    $(error Failed to obtain version for this build.)
+endif
+
 #------------------------------------------------------------------------------
 
 # Maybe you need one of these.  Maybe you don't.
 OGL_LIBS= -lGL -lm
 #OGL_LIBS= -lm                                                # Think Different
 
-#------------------------------------------------------------------------------
-# Configuration constants
-#------------------------------------------------------------------------------
-
 CFLAGS= -Wall -g -O3 -ansi -pedantic $(shell sdl-config --cflags)
 #CFLAGS= -Wall -g -O1 -ansi -pedantic $(shell sdl-config --cflags)
 #CFLAGS= -Wall -pg -ansi $(shell sdl-config --cflags)
 
-CPPFLAGS := -Ishare $(CPPFLAGS)
+CPPFLAGS := -DVERSION=\"$(VERSION)\" -Ishare $(CPPFLAGS)
 
 SDL_LIBS= $(shell sdl-config --libs)
 PNG_LIBS= $(shell libpng-config --libs)
 
-MAPC_TARG= mapc
-BALL_TARG= neverball
-PUTT_TARG= neverputt
+MAPC_TARG= mapc$(EXT)
+BALL_TARG= neverball$(EXT)
+PUTT_TARG= neverputt$(EXT)
 
 MAPC_EXEC= ./$(MAPC_TARG)
 
@@ -175,6 +180,9 @@ test : all
 tools :
        cd tools && $(MAKE)
 
+mingw-%:
+       $(MAKE) -f Makefile.mingw $*
+
 #------------------------------------------------------------------------------
 # PO update rules
 #------------------------------------------------------------------------------
@@ -184,7 +192,7 @@ po/%.po : $(POTFILE)
        touch $@
        
 po-update-extract :
-       sh extractpo.sh $(POTFILE) $(LOCALEDOM)
+       sh scripts/extractpo.sh $(POTFILE) $(LOCALEDOM)
 
 po-update-merge : $(POS)