X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=Makefile;h=fbb726ee5c692ca4c2e0bc9a7b553eccc90c9a8e;hb=24a3c8d1bfca6a746137ff6e6d5658109079e09c;hp=5db57b8c73c5844ec06fdeb2179a7b0a0e7e1e08;hpb=88f34c4bb4a47098b2c932b6e3fffe4cc1cd4fdc;p=neverball diff --git a/Makefile b/Makefile index 5db57b8..fbb726e 100644 --- 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. @@ -9,20 +18,18 @@ 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) @@ -127,10 +134,10 @@ LINGUAS= $(POS:po/%.po=%) #------------------------------------------------------------------------------ %.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 @@ -173,6 +180,9 @@ test : all tools : cd tools && $(MAKE) +mingw-%: + $(MAKE) -f Makefile.mingw $* + #------------------------------------------------------------------------------ # PO update rules #------------------------------------------------------------------------------ @@ -182,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)