0ad/0ad-debug.patch

111 lines
4.8 KiB
Diff
Raw Normal View History

2013-04-03 15:00:33 +00:00
diff -up 0ad-0.0.13-alpha/libraries/source/fcollada/src/Makefile.orig 0ad-0.0.13-alpha/libraries/source/fcollada/src/Makefile
--- 0ad-0.0.13-alpha/libraries/source/fcollada/src/Makefile.orig 2013-04-03 10:18:41.527414409 -0300
+++ 0ad-0.0.13-alpha/libraries/source/fcollada/src/Makefile 2013-04-03 10:21:17.209420370 -0300
@@ -9,10 +9,7 @@ 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 := -O1 -DNDEBUG -DRETAIL
-# (-O2 with gcc 4.3 causes linker errors when using this library, for unknown reasons, so stick with -O1)
-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)
@@ -181,72 +178,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_dirs output/libFColladaSD.a output/libFColladaSR.a install
+all: output_dirs 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
-
-output/libFColladaSD.a: $(OBJECTS_DEBUG)
- @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}'
output/libFColladaSR.a: $(OBJECTS_RELEASE)
@echo "$@"
@ar -cr $@ $(OBJECTS_RELEASE); ranlib $@
-output/FColladaTest: $(OBJECTS_TEST)
- $(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)
@@ -256,18 +200,10 @@ gendep = \
sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(dfile) >> $(Pfile) && \
rm -f $(dfile)
-output/debug/%.o: %.cpp
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_DEBUG) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
- $(gendep)
output/release/%.o: %.cpp
@echo "$<"
$(CXX) $(CXXFLAGS) $(CXXFLAGS_RELEASE) $(INCLUDES) -MD -MF $(dfile) -c $< -o $@
$(gendep)
-output/test/%.o: %.cpp
- @echo "$<"
- $(CXX) $(CXXFLAGS) $(CXXFLAGS_TEST) $(INCLUDES_TEST) -MD -MF $(dfile) -c $< -o $@
- $(gendep)
clean:
rm -rf output