add OpenCOLLADA support to Makefiles
authorStefan Gartner <stefang@aon.at>
Sun, 10 Jan 2010 09:11:48 +0000 (09:11 +0000)
committerStefan Gartner <stefang@aon.at>
Sun, 10 Jan 2010 09:11:48 +0000 (09:11 +0000)
add "export WITH_OPENCOLLADA=true" to user-def.mk to enable it

source/Makefile
source/blender/Makefile
source/blender/collada/Makefile [new file with mode: 0644]
source/blender/windowmanager/intern/Makefile
source/nan_definitions.mk
source/nan_link.mk

index 87843dfbfc93b61eb1370317d9e656207906ac97..2f935c9109524b0cca8ceb3663492b3dba8ef57c 100644 (file)
@@ -211,6 +211,11 @@ ifeq ($(WITH_BINRELOC), true)
     COMLIB += $(OCGDIR)/extern/binreloc/$(DEBUG_DIR)libbinreloc.a
 endif
 
+ifeq ($(WITH_OPENCOLLADA), true)
+    COMLIB += $(OCGDIR)/blender/bf_collada/$(DEBUG_DIR)/libbf_collada.a
+    COMLIB += $(BF_PCRE_LIBS)
+endif
+
 ifeq ($(OS), windows)
     ifeq ($(FREE_WINDOWS), true)
         COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
index 6bc874c3c937eb66f5c8336e0e3be24d097b251c..1c4ff6935b9948802f0830c812040792b941732c 100644 (file)
@@ -37,13 +37,17 @@ DIRS += python nodes gpu
 DIRS += blenfont ikplugin
 
 ifeq ($(WITH_QUICKTIME), true)
-       DIRS += quicktime
+    DIRS += quicktime
 endif
 
 ifeq ($(WITH_OPENJPEG), true)
     CFLAGS += -DWITH_OPENJPEG -I../../../../extern/libopenjpeg
 endif
 
+ifeq ($(WITH_OPENCOLLADA), true)
+    DIRS += collada
+endif
+
 
 DIR = $(OCGDIR)/blender
 SOURCEDIR = source/blender
diff --git a/source/blender/collada/Makefile b/source/blender/collada/Makefile
new file mode 100644 (file)
index 0000000..29a731d
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# $Id:
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2008 Blender Foundation.
+# All rights reserved.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL LICENSE BLOCK *****
+#
+#
+
+LIBNAME = bf_collada
+DIR = $(OCGDIR)/blender/bf_collada
+
+include nan_compile.mk
+
+CCFLAGS += $(LEVEL_1_C_WARNINGS)
+
+CPPFLAGS += -I../makesdna -I../blenlib -I../blenkernel -I../editors/include
+CPPFLAGS += -I../windowmanager -I../makesrna
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CPPFLAGS += -I$(BF_OPENCOLLADA)/include/COLLADABaseUtils
+CPPFLAGS += -I$(BF_OPENCOLLADA)/include/COLLADAFrameWork
+CPPFLAGS += -I$(BF_OPENCOLLADA)/include/COLLADAStreamWriter
+CPPFLAGS += -I$(BF_OPENCOLLADA)/include/COLLADASaxFrameworkLoader
index f4d65975d43d831ae6c93aebecb2b05eef39f318..e472c87fe5464a62e71ddca289d030d94b50b93d 100644 (file)
@@ -74,6 +74,10 @@ ifeq ($(WITH_QUICKTIME),true)
        CPPFLAGS += -DWITH_QUICKTIME
 endif
 
+ifeq ($(WITH_OPENCOLLADA), true)
+    CPPFLAGS += -DWITH_COLLADA
+endif
+
 ifeq ($(OS),linux)
     ifeq ($(CPU),alpha)
        CPPFLAGS += -I$(NAN_MESA)/include
index 952b57601b76828f7ba114ef465bfa58426c8a6d..24fe489a26c59943a8e5888397c47680b7fda64c 100644 (file)
@@ -150,8 +150,17 @@ ifndef CONFIG_GUESS
     export NAN_FFMPEGCFLAGS = $(shell pkg-config --cflags libavcodec libavdevice libavformat libswscale libavutil)
   endif
 
-    # Compare recreated .mo files with committed ones
-    export BF_VERIFY_MO_FILES ?= true
+  ifeq ($(WITH_OPENCOLLADA), true)
+    export BF_OPENCOLLADA ?= $(LCGDIR)/opencollada
+    export BF_OPENCOLLADA_INC ?= $(BF_OPENCOLLADA)/include
+    export BF_OPENCOLLADA_LIBS ?= $(BF_OPENCOLLADA)/lib/libOpenCOLLADASaxFrameworkLoader.a $(BF_OPENCOLLADA)/lib/libOpenCOLLADAFramework.a $(BF_OPENCOLLADA)/lib/libOpenCOLLADABaseUtils.a $(BF_OPENCOLLADA)/lib/libOpenCOLLADAStreamWriter.a $(BF_OPENCOLLADA)/lib/libMathMLSolver.a $(BF_OPENCOLLADA)/lib/libGeneratedSaxParser.a $(BF_OPENCOLLADA)/lib/libUTF.a -lxml2
+    export BF_PCRE ?= $(LCGDIR)/pcre
+    export BF_PCRE_LIBS ?= $(NAN_PCRE)/lib/libpcre.a
+  endif
+
+
+  # Compare recreated .mo files with committed ones
+  export BF_VERIFY_MO_FILES ?= true
 
   # Platform Dependent settings go below:
   ifeq ($(OS),darwin)
@@ -265,6 +274,8 @@ ifndef CONFIG_GUESS
         export USE_QTKIT = true
     endif
 
+    export NAN_PCRE = $(LCGDIR)/opencollada
+
   else
   ifeq ($(OS),freebsd)
 
index f28a07f06a947a700189ba803d4cdc1fd44827fb..54021ab016f2cd7005fbdfab33cd6225a2cb75b5 100644 (file)
@@ -187,4 +187,8 @@ ifeq ($(WITH_FFTW3),true)
     LLIBS += $(BF_FFTW3_LIBS)
 endif
 
+ifeq ($(WITH_OPENCOLLADA),true)
+    LLIBS += $(BF_OPENCOLLADA_LIBS)
+endif
+
 LLIBS += $(NAN_PYTHON_LIB)