Apparently Make doesn't expand CFLAGS in CXXFLAGS+=$(CFLAGS), so duplicate the line instead...

Also use GNU99 instead of C99 and CXX for .cpp files.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3489 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2008-01-15 19:35:04 +00:00
parent d1f744e97c
commit fc384c7c44
2 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@
$(CC) $(CFLAGS) -c -o$@ $<
%.o: %.cpp
$(CC) $(CXXFLAGS) -c -o$@ $<
$(CXX) $(CXXFLAGS) -c -o$@ $<
%.lex.c: %.l
$(FLEX) $(FLEXFLAGS) -o$@ $<

View File

@ -51,11 +51,11 @@ endif
# Setup paths and static values
CFLAGS+=-DPACKAGE_VERSION=\"$(VERSION)\" -DYY_STATIC -DLOCALEDIR=\"$(LOCALEDIR)\" -DPACKAGE=\"$(PACKAGE)\" -I.. -I../.. -I$(DEVDIR)/include/SDL -I$(DEVDIR)/include/libpng12 -I$(DEVDIR)/include
CXXFLAGS+=$(CFLAGS)
CXXFLAGS+=-DPACKAGE_VERSION=\"$(VERSION)\" -DYY_STATIC -DLOCALEDIR=\"$(LOCALEDIR)\" -DPACKAGE=\"$(PACKAGE)\" -I.. -I../.. -I$(DEVDIR)/include/SDL -I$(DEVDIR)/include/libpng12 -I$(DEVDIR)/include
LDFLAGS+=-L$(DEVDIR)/lib
# Use C99
CFLAGS+=-std=c99
CFLAGS+=-std=gnu99
# Setup build environment with config values
@ -77,6 +77,7 @@ RMF=del /F
EXEEXT=.exe
AR=ar
CC=gcc
CXX=g++
WINDRES=windres
CFLAGS+=-mwindows -DWIN32
CXXFLAGS+=-mwindows -DWIN32
@ -88,6 +89,7 @@ RMF=rm -f
EXEEXT=.exe
AR=mingw32-ar
CC=mingw32-gcc
CXX=mingw32-g++
WINDRES=mingw32-windres
CFLAGS+=-mwindows -DWIN32
CXXFLAGS+=-mwindows -DWIN32
@ -98,6 +100,7 @@ RMF=rm -f
EXEEXT=
AR=ar
CC=gcc
CXX=g++
WINDRES=
endif
endif