+#-------------------------------------------------------------------------------
+
+#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 := -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)
#------------------------------------------------------------------------------
%.d : %.c
- $(CC) $(CFLAGS) -Ishare -MM -MF $@ -MT '$*.o $@' $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -MM -MF $@ -MT '$*.o $@' $<
%.o : %.c
- $(CC) $(CFLAGS) -Ishare -o $@ -c $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
%.sol : %.map $(MAPC_TARG)
$(MAPC_EXEC) $< data
tools :
cd tools && $(MAKE)
+mingw-%:
+ $(MAKE) -f Makefile.mingw $*
+
#------------------------------------------------------------------------------
# PO update rules
#------------------------------------------------------------------------------
touch $@
po-update-extract :
- sh extractpo.sh $(POTFILE) $(LOCALEDOM)
+ sh scripts/extractpo.sh $(POTFILE) $(LOCALEDOM)
po-update-merge : $(POS)