0ad/0ad-debug.patch

113 lines
4.8 KiB
Diff
Raw Normal View History

2015-03-15 19:09:20 +00:00
diff -up libraries/source/fcollada/src/Makefile.orig libraries/source/fcollada/src/Makefile
--- libraries/source/fcollada/src/Makefile.orig 2015-03-14 13:28:07.304868532 -0300
+++ libraries/source/fcollada/src/Makefile 2015-03-14 13:28:11.168868680 -0300
2014-10-12 19:22:10 +00:00
@@ -9,12 +9,9 @@ endif
2013-12-27 21:02:59 +00:00
CXX ?= g++
CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
2014-10-12 19:22:10 +00:00
CXXFLAGS_RELEASE := -O2 -DNDEBUG -DRETAIL
-CXXFLAGS_TEST := -O0 -g -D_DEBUG
LIBS += `pkg-config libxml-2.0 --libs`
INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`
2014-10-12 19:22:10 +00:00
-INCLUDES_TEST := -IFCollada/FColladaTest $(INCLUDES)
# FCollada is not aliasing-safe, so disallow dangerous optimisations
# (TODO: It'd be nice to fix FCollada, but that looks hard)
@@ -180,72 +177,19 @@ SOURCE = \
FColladaPlugins/FArchiveXML/FAXSceneExport.cpp \
FColladaPlugins/FArchiveXML/FAXSceneImport.cpp \
-TEST_SOURCE = \
- FCollada/FMath/FMArrayTest.cpp \
- FCollada/FMath/FMQuaternionTest.cpp \
- FCollada/FMath/FMTreeTest.cpp \
- FCollada/FUtils/FUBoundingTest.cpp \
- FCollada/FUtils/FUCrc32Test.cpp \
- FCollada/FUtils/FUEventTest.cpp \
- FCollada/FUtils/FUFileManagerTest.cpp \
- FCollada/FUtils/FUFunctorTest.cpp \
- FCollada/FUtils/FUObjectTest.cpp \
- FCollada/FUtils/FUStringBuilderTest.cpp \
- FCollada/FUtils/FUStringConversionTest.cpp \
- FCollada/FUtils/FUStringTest.cpp \
- FCollada/FUtils/FUTestBed.cpp \
- FCollada/FUtils/FUUniqueStringMapTest.cpp \
- FCollada/FColladaTest/FCTest.cpp \
- FCollada/FColladaTest/FCTestAnimation.cpp \
- FCollada/FColladaTest/FCTestArchiving.cpp \
- FCollada/FColladaTest/FCTestController.cpp \
- FCollada/FColladaTest/FCTestGeometryPolygonsTools.cpp \
- FCollada/FColladaTest/FCTestParameters.cpp \
- FCollada/FColladaTest/FCTestSceneGraph.cpp \
- FCollada/FColladaTest/FCTestAssetManagement/FCTAMCrossCloning.cpp \
- FCollada/FColladaTest/FCTestAssetManagement/FCTAssetManagement.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEIAnimation.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEICamera.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEIEmitter.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEIExtra.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEIGeometry.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEILight.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEIMaterial.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEIPhysics.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTEIVisualScene.cpp \
- FCollada/FColladaTest/FCTestExportImport/FCTestExportImport.cpp \
- FCollada/FColladaTest/FCTestXRef/FCTestXRef.cpp \
- FCollada/FColladaTest/FCTestXRef/FCTestXRefAcyclic.cpp \
- FCollada/FColladaTest/FCTestXRef/FCTestXRefSimple.cpp \
- FCollada/FColladaTest/FCTestXRef/FCTestXRefTree.cpp \
-
-OBJECTS_DEBUG = $(addprefix output/debug/,$(SOURCE:.cpp=.o))
OBJECTS_RELEASE = $(addprefix output/release/,$(SOURCE:.cpp=.o))
-OBJECTS_TEST = $(addprefix output/test/,$(SOURCE:.cpp=.o) $(TEST_SOURCE:.cpp=.o))
-OBJECTS_ALL = $(OBJECTS_DEBUG) $(OBJECTS_RELEASE) $(OBJECTS_TEST)
+OBJECTS_ALL = $(OBJECTS_RELEASE)
2014-10-12 19:22:10 +00:00
-all: output/libFColladaSD.a output/libFColladaSR.a install
+all: output/libFColladaSR.a install
output_dirs:
- bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
-
-test: FCollada/FColladaTest/ output/FColladaTest
- ( cd FCollada/FColladaTest/ ; ../../output/FColladaTest )
- cat FCollada/FColladaTest/FColladaTestLog.txt
2013-04-03 15:00:33 +00:00
-
2014-10-12 19:22:10 +00:00
-output/libFColladaSD.a: $(OBJECTS_DEBUG) | output_dirs
- @echo "$@"
- @ar -cr $@ $(OBJECTS_DEBUG); ranlib $@
2013-04-03 15:00:33 +00:00
+ bash -c 'mkdir -p output/release/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
2014-10-12 19:22:10 +00:00
output/libFColladaSR.a: $(OBJECTS_RELEASE) | output_dirs
@echo "$@"
2013-12-27 21:02:59 +00:00
@ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
2014-10-12 19:22:10 +00:00
-output/FColladaTest: $(OBJECTS_TEST) | output_dirs
2013-12-27 21:02:59 +00:00
- $(CXX) -o $@ $(LDFLAGS) $(OBJECTS_TEST) $(LIBS)
-
-install: output/libFColladaSD.a output/libFColladaSR.a
- cp output/libFColladaSD.a ../lib/libFColladaSD.a
+install: output/libFColladaSR.a
cp output/libFColladaSR.a ../lib/libFColladaSR.a
dfile = $(@:.o=.d)
2014-10-12 19:22:10 +00:00
@@ -255,18 +199,10 @@ gendep = \
sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(dfile) >> $(Pfile) && \
rm -f $(dfile)
2014-10-12 19:22:10 +00:00
-output/debug/%.o: %.cpp | output_dirs
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_DEBUG) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
- $(gendep)
2014-10-12 19:22:10 +00:00
output/release/%.o: %.cpp | output_dirs
@echo "$<"
$(CXX) $(CXXFLAGS) $(CXXFLAGS_RELEASE) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
$(gendep)
2014-10-12 19:22:10 +00:00
-output/test/%.o: %.cpp | output_dirs
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_TEST) $(INCLUDES_TEST) -MD -MF $(dfile) -c $< -o $@
- $(gendep)
clean:
rm -rf output