--- Makefile.orig 2013-05-28 17:58:03.379228527 -0400 +++ Makefile 2013-05-28 17:58:24.768491369 -0400 @@ -88,8 +88,6 @@ endif endif endif -else - CFLAGS += -O endif ifdef DEBUG @@ -108,6 +106,7 @@ endif else CFLAGS += -DNDEBUG + CXXFLAGS += -DNDEBUG endif ifneq ($(PROFILE),) @@ -120,6 +119,7 @@ ifneq ($(MULTI_THREAD),) CFLAGS += -DMULTI_THREAD=$(MULTI_THREAD) + CXXFLAGS += -DMULTI_THREAD=$(MULTI_THREAD) ifneq ($(MULTI_THREAD),1) ifeq ($(OSTYPE),mingw) #use lpthreadGC2d for debug alternatively @@ -134,10 +134,12 @@ REV = $(shell svnversion) ifneq ($(REV),) CFLAGS += -DREVISION="$(REV)" + CXXFLAGS += -DREVISION="$(REV)" endif endif CFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS) +CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS) CCFLAGS += -Wstrict-prototypes @@ -456,6 +458,7 @@ ifeq ($(BACKEND),sdl) SOURCES += simsys_s.cc CFLAGS += -DUSE_16BIT_DIB + CXXFLAGS += -DUSE_16BIT_DIB ifeq ($(OSTYPE),mac) # Core Audio (Quicktime) base sound system routines SOURCES += sound/core-audio_sound.mm @@ -488,6 +491,7 @@ endif endif CFLAGS += $(SDL_CFLAGS) + CXXFLAGS += $(SDL_CFLAGS) LIBS += $(SDL_LDFLAGS) endif @@ -497,6 +501,7 @@ SOURCES += sound/sdl_mixer_sound.cc SOURCES += music/sdl_midi.cc CFLAGS += -DUSE_16BIT_DIB + CXXFLAGS += -DUSE_16BIT_DIB ifeq ($(SDL_CONFIG),) SDL_CFLAGS := -I$(MINGDIR)/include/SDL -Dmain=SDL_main SDL_LDFLAGS := -lmingw32 -lSDLmain -lSDL @@ -511,6 +516,7 @@ endif endif CFLAGS += $(SDL_CFLAGS) + CXXFLAGS += $(SDL_CFLAGS) LIBS += $(SDL_LDFLAGS) -lSDL_mixer endif @@ -544,6 +550,7 @@ endif endif CFLAGS += $(SDL_CFLAGS) + CXXFLAGS += $(SDL_CFLAGS) LIBS += $(SDL_LDFLAGS) -lglew32 ifeq ($(OSTYPE),mingw) LIBS += -lopengl32 @@ -559,6 +566,7 @@ endif CFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH) +CXXFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH) ifneq ($(findstring $(OSTYPE), cygwin mingw),) SOURCES += simres.rc @@ -566,7 +574,6 @@ endif CCFLAGS += $(CFLAGS) -CXXFLAGS += $(CFLAGS) BUILDDIR ?= build/$(CFG) PROGDIR ?= $(BUILDDIR)