Subversion Repositories Games.Chess Giants

Rev

Rev 182 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 182 Rev 183
Line 76... Line 76...
76
# at the end of the line for flag values.
76
# at the end of the line for flag values.
77
 
77
 
78
### 2.1. General and architecture defaults
78
### 2.1. General and architecture defaults
79
optimize = yes
79
optimize = yes
80
debug = no
80
debug = no
81
sanitize = no
81
#sanitize = no
-
 
82
sanitize = address
82
bits = 32
83
bits = 32
83
prefetch = no
84
prefetch = no
84
popcnt = no
85
popcnt = no
85
sse = no
86
sse = no
86
pext = no
87
pext = no
Line 151... Line 152...
151
 
152
 
152
### 3.1 Selecting compiler (default = gcc)
153
### 3.1 Selecting compiler (default = gcc)
153
 
154
 
154
ifeq ($(OS),Windows_NT)
155
ifeq ($(OS),Windows_NT)
155
# Pierre-Marie Baty -- we need two extra flags AND the C++14 standard when building with Clang against the Visual Studio 2015 SDK
156
# Pierre-Marie Baty -- we need two extra flags AND the C++14 standard when building with Clang against the Visual Studio 2015 SDK
156
CXXFLAGS += -Xclang -flto-visibility-public-std -Wall -Wcast-qual -fno-exceptions -std=c++14 $(EXTRACXXFLAGS)
157
CXXFLAGS += -Xclang -flto-visibility-public-std -Wall -Wcast-qual -std=c++14 $(EXTRACXXFLAGS)
-
 
158
# -fno-exceptions
157
DEPENDFLAGS += -std=c++14
159
DEPENDFLAGS += -std=c++14
158
else
160
else
159
CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -std=c++11 $(EXTRACXXFLAGS)
161
CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -std=c++11 $(EXTRACXXFLAGS)
160
DEPENDFLAGS += -std=c++11
162
DEPENDFLAGS += -std=c++11
161
endif
163
endif
Line 267... Line 269...
267
### Allow overwriting CXX from command line
269
### Allow overwriting CXX from command line
268
ifdef COMPCXX
270
ifdef COMPCXX
269
	CXX=$(COMPCXX)
271
	CXX=$(COMPCXX)
270
endif
272
endif
271
 
273
 
272
# Pierre-Marie Baty -- also add the test case for Windows
274
### On mingw use Windows threads, otherwise POSIX
273
ifneq ($(OS),Windows_NT)
275
ifneq ($(comp),mingw)
274
	### On mingw use Windows threads, otherwise POSIX
276
	# Pierre-Marie Baty -- also add the test case for Windows
275
	ifneq ($(comp),mingw)
277
	ifneq ($(OS),Windows_NT)
276
		# On Android Bionic's C library comes with its own pthread implementation bundled in
278
		# On Android Bionic's C library comes with its own pthread implementation bundled in
277
		ifneq ($(OS),Android)
279
		ifneq ($(OS),Android)
278
			# Haiku has pthreads in its libroot, so only link it in on other platforms
280
			# Haiku has pthreads in its libroot, so only link it in on other platforms
279
			ifneq ($(KERNEL),Haiku)
281
			ifneq ($(KERNEL),Haiku)
280
				LDFLAGS += -lpthread
282
				LDFLAGS += -lpthread
281
			endif
283
			endif
282
		endif
284
		endif
283
	endif
285
	endif
284
endif
286
endif
285
 
287
 
286
### 3.2.1 Debugging
288
### 3.2.1 Debugging
287
ifeq ($(debug),no)
289
ifeq ($(debug),no)
288
	CXXFLAGS += -DNDEBUG
290
	CXXFLAGS += -DNDEBUG
289
else
291
else
290
	CXXFLAGS += -g
292
	CXXFLAGS += -g
291
endif
293
endif
292
 
294
 
293
### 3.2.2 Debugging with undefined behavior sanitizers
295
### 3.2.2 Debugging with undefined behavior sanitizers
294
ifneq ($(sanitize),no)
296
ifneq ($(sanitize),no)
295
        CXXFLAGS += -g3 -fsanitize=$(sanitize) -fuse-ld=gold
297
        CXXFLAGS += -g3 -fsanitize=$(sanitize)
296
        LDFLAGS += -fsanitize=$(sanitize) -fuse-ld=gold
298
        LDFLAGS += -fsanitize=$(sanitize)
-
 
299
	# Pierre-Marie Baty -- don't use any other linker than the system one on Windows
-
 
300
	ifneq ($(OS),Windows_NT)
-
 
301
		CXXFLAGS += -fuse-ld=gold
-
 
302
		LDFLAGS += -fuse-ld=gold
-
 
303
	endif
297
endif
304
endif
298
 
305
 
299
### 3.3 Optimization
306
### 3.3 Optimization
300
ifeq ($(optimize),yes)
307
ifeq ($(optimize),yes)
301
 
308