0ad/0ad-debug.patch
2015-03-15 16:09:20 -03:00

113 lines
4.8 KiB
Diff

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
@@ -9,12 +9,9 @@ endif
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
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`
-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)
-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
-
-output/libFColladaSD.a: $(OBJECTS_DEBUG) | output_dirs
- @echo "$@"
- @ar -cr $@ $(OBJECTS_DEBUG); ranlib $@
+ bash -c 'mkdir -p output/release/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
output/libFColladaSR.a: $(OBJECTS_RELEASE) | output_dirs
@echo "$@"
@ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
-output/FColladaTest: $(OBJECTS_TEST) | output_dirs
- $(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)
@@ -255,18 +199,10 @@ gendep = \
sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(dfile) >> $(Pfile) && \
rm -f $(dfile)
-output/debug/%.o: %.cpp | output_dirs
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_DEBUG) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
- $(gendep)
output/release/%.o: %.cpp | output_dirs
@echo "$<"
$(CXX) $(CXXFLAGS) $(CXXFLAGS_RELEASE) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
$(gendep)
-output/test/%.o: %.cpp | output_dirs
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_TEST) $(INCLUDES_TEST) -MD -MF $(dfile) -c $< -o $@
- $(gendep)
clean:
rm -rf output