|
@@ -91,8 +91,9 @@ INSTALL_INCLUDE=$(DESTDIR)/usr/include
|
91
|
91
|
|
92
|
92
|
###############################################################
|
93
|
93
|
CC=gcc
|
|
94
|
+WARNINGS=-std=c++11 -Wall -Wextra -pedantic -Wno-unused-parameter
|
94
|
95
|
|
95
|
|
-BASE_CFLAGS=-Wall $(BASE_DEFS) \
|
|
96
|
+BASE_CFLAGS=$(WARNINGS) $(BASE_DEFS) \
|
96
|
97
|
-DVERSION=\"\\\"$(NAME)-$(VERSION)-$(BUILD_ID)\\\"\" \
|
97
|
98
|
-DBUILD_HOST=\"\\\"$(BUILD_HOST)\\\"\"
|
98
|
99
|
|
|
@@ -275,7 +276,7 @@ endif
|
275
|
276
|
#################################################################
|
276
|
277
|
# Unit Test builds
|
277
|
278
|
#################################################################
|
278
|
|
-TEST_FLAGS=-Wall -g -O0 -DDEBUG -lstdc++ -Iinclude
|
|
279
|
+TEST_FLAGS=$(WARNINGS) -g -O0 -DDEBUG -lstdc++ -Iinclude
|
279
|
280
|
|
280
|
281
|
TEST_MAP_TR5=~/projects/Data/models/tombraider/tr5/demo.trc
|
281
|
282
|
TEST_MAP_TR4=~/projects/Data/models/tombraider/tr4/angkor1.tr4
|
|
@@ -295,7 +296,7 @@ TR_FLAGS = -D__TEST_TR5_DUMP_TGA -D__TEST_32BIT_TEXTILES -DDEBUG_MEMORY
|
295
|
296
|
|
296
|
297
|
TombRaider.test:
|
297
|
298
|
@-mkdir -p $(BUILD_TEST_DIR)
|
298
|
|
- $(CC) -Wall -Iinclude $(TR_FLAGS) -o $(BUILD_TEST_DIR)/TombRaiderTest.o -c test/TombRaider.cpp
|
|
299
|
+ $(CC) $(WARNINGS) -Iinclude $(TR_FLAGS) -o $(BUILD_TEST_DIR)/TombRaiderTest.o -c test/TombRaider.cpp
|
299
|
300
|
$(MAKE) targets NAME=TombRaider.test BUILDDIR=$(BUILD_TEST_DIR) \
|
300
|
301
|
OBJS="$(BUILD_TEST_DIR)/TombRaiderTest.o $(BUILD_TEST_DIR)/TombRaider.o $(BUILD_TEST_DIR)/tga.o $(BUILD_TEST_DIR)/memory_test.o" \
|
301
|
302
|
CFLAGS="$(BASE_CFLAGS) -g $(TR_FLAGS)" \
|
|
@@ -305,7 +306,7 @@ TombRaider.test:
|
305
|
306
|
|
306
|
307
|
GLString.test:
|
307
|
308
|
mkdir -p $(BUILD_TEST_DIR)
|
308
|
|
- $(CC) -Wall -Iinclude -DHAVE_SDL_TTF -DHAVE_SDL \
|
|
309
|
+ $(CC) $(WARNINGS) -Iinclude -DHAVE_SDL_TTF -DHAVE_SDL \
|
309
|
310
|
$(shell sdl-config --cflags) $(shell sdl-config --libs) \
|
310
|
311
|
$(GL_LIBS) $(GL_DEFS) -lSDL_ttf -lm -lstdc++ \
|
311
|
312
|
src/Texture.cpp src/GLString.cpp \
|
|
@@ -327,27 +328,27 @@ Hel.test: Quaternion.test Matrix.test Math.test
|
327
|
328
|
Matrix.test:
|
328
|
329
|
@-echo "Building Matrix unit test"
|
329
|
330
|
mkdir -p $(BUILD_TEST_DIR)
|
330
|
|
- $(CC) -Wall -g -lm -lstdc++ -Iinclude \
|
|
331
|
+ $(CC) $(WARNINGS) -g -lm -lstdc++ -Iinclude \
|
331
|
332
|
src/Matrix.cpp src/Quaternion.cpp src/Vector3d.cpp \
|
332
|
333
|
test/Matrix.cpp -o $(BUILD_TEST_DIR)/Matrix.test
|
333
|
334
|
|
334
|
335
|
Quaternion.test:
|
335
|
336
|
@-echo "Building Quaternion unit test"
|
336
|
337
|
mkdir -p $(BUILD_TEST_DIR)
|
337
|
|
- $(CC) -Wall -g -lm -lstdc++ -Iinclude \
|
|
338
|
+ $(CC) $(WARNINGS) -g -lm -lstdc++ -Iinclude \
|
338
|
339
|
src/Quaternion.cpp test/Quaternion.cpp -o $(BUILD_TEST_DIR)/Quaternion.test
|
339
|
340
|
|
340
|
341
|
Math.test:
|
341
|
342
|
@-echo "Building Math unit test"
|
342
|
343
|
mkdir -p $(BUILD_TEST_DIR)
|
343
|
|
- $(CC) -Wall -g -lm -lstdc++ -Iinclude \
|
|
344
|
+ $(CC) $(WARNINGS) -g -lm -lstdc++ -Iinclude \
|
344
|
345
|
src/MatMath.cpp src/Vector3d.cpp test/MatMath.cpp -o $(BUILD_TEST_DIR)/Math.test
|
345
|
346
|
|
346
|
347
|
#################################################################
|
347
|
348
|
|
348
|
349
|
Memory.test:
|
349
|
350
|
mkdir -p $(BUILD_TEST_DIR)
|
350
|
|
- $(CC) -Wall -g -lstdc++ -Iinclude \
|
|
351
|
+ $(CC) $(WARNINGS) -g -lstdc++ -Iinclude \
|
351
|
352
|
-DDEBUG_MEMORY -DDEBUG_MEMORY_ERROR \
|
352
|
353
|
src/memory_test.cpp test/memory_test.cpp -o $(BUILD_TEST_DIR)/memory_test.test
|
353
|
354
|
|