1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
--- Makefile.orig
+++ Makefile
@@ -81,8 +81,6 @@
ifeq ($(findstring $(OSTYPE), amiga haiku mac),)
CFLAGS += -minline-all-stringops
endif
-else
- CFLAGS += -O
endif
ifdef DEBUG
@@ -101,6 +99,7 @@
endif
else
CFLAGS += -DNDEBUG
+ CXXFLAGS += -DNDEBUG
endif
ifneq ($(PROFILE),)
@@ -114,6 +113,7 @@
ifneq ($(MULTI_THREAD),)
ifeq ($(shell expr $(MULTI_THREAD) \>= 1), 1)
CFLAGS += -DMULTI_THREAD
+ CXXFLAGS += -DMULTI_THREAD
ifeq ($(OSTYPE),mingw)
#use lpthreadGC2d for debug alternatively
LDFLAGS += -lpthreadGC2
@@ -132,11 +132,13 @@
endif
ifneq ($(REV),)
CFLAGS += -DREVISION="$(REV)"
+ CXXFLAGS += -DREVISION="$(REV)"
endif
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
@@ -492,6 +494,7 @@
SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
endif
CFLAGS += $(SDL_CFLAGS)
+ CXXFLAGS += $(SDL_CFLAGS)
LIBS += $(SDL_LDFLAGS)
endif
@@ -523,6 +526,7 @@
SDL_LDFLAGS := $(shell $(SDL2_CONFIG) --libs)
endif
CFLAGS += $(SDL_CFLAGS)
+ CXXFLAGS += $(SDL_CFLAGS)
LIBS += $(SDL_LDFLAGS)
endif
@@ -538,6 +542,7 @@
SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
endif
CFLAGS += $(SDL_CFLAGS)
+ CXXFLAGS += $(SDL_CFLAGS)
LIBS += $(SDL_LDFLAGS) -lSDL_mixer
endif
@@ -564,6 +569,7 @@
SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
endif
CFLAGS += $(SDL_CFLAGS)
+ CXXFLAGS += $(SDL_CFLAGS)
LIBS += $(SDL_LDFLAGS) -lglew32
ifeq ($(OSTYPE),mingw)
LIBS += -lopengl32
@@ -579,6 +585,7 @@
endif
CFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
+CXXFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
ifneq ($(findstring $(OSTYPE), cygwin mingw),)
SOURCES += simres.rc
@@ -586,7 +593,6 @@
endif
CCFLAGS += $(CFLAGS)
-CXXFLAGS += $(CFLAGS)
BUILDDIR ?= build/$(CFG)
PROGDIR ?= $(BUILDDIR)
|