Changed back Makefile.mingw to compile maps with "wine mapc.exe" by
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 8 Jul 2007 15:02:42 +0000 (15:02 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 8 Jul 2007 15:02:42 +0000 (15:02 +0000)
default.  Compile on MSYS with "make -f Makefile.mingw native".

Added support for user-suplied CPPFLAGS to Makefile in order to simplify
and share some code between cross-make and cross-configure scripts.

git-svn-id: https://s.snth.net/svn/neverball/trunk@1029 78b8d119-cf0a-0410-b17c-f493084dd1d7

Makefile
Makefile.mingw

index 5db57b8..d7e0163 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,8 @@ 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)
+
 SDL_LIBS= $(shell sdl-config --libs)
 PNG_LIBS= $(shell libpng-config --libs)
 
@@ -127,10 +129,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
index 65eba1a..a371d22 100644 (file)
@@ -4,11 +4,13 @@ MAPC_TARG= mapc.exe
 BALL_TARG= neverball.exe
 PUTT_TARG= neverputt.exe
 
+MAPC_EXEC= wine $(MAPC_TARG)
+
 OGL_LIBS := -lm -lopengl32
 BASE_LIBS := $(LDFLAGS) -lSDL -lSDL_image -lintl
 
 LIBS := $(SDL_LIBS) -lSDL_image -lSDL_mixer -lSDL_ttf \
        $(OGL_LIBS) $(PNG_LIBS) -lintl
 
-cross:
-       $(MAKE) -f Makefile.mingw MAPC_EXEC="wine mapc.exe"
+native:
+       $(MAKE) -f Makefile.mingw MAPC_EXEC=$(MAPC_TARG)