From 9da2c0c6c2507e16a6c38361f423c9eb35d40546 Mon Sep 17 00:00:00 2001 From: Stefan Gartner Date: Sun, 10 Jan 2010 09:11:48 +0000 Subject: [PATCH] add OpenCOLLADA support to Makefiles add "export WITH_OPENCOLLADA=true" to user-def.mk to enable it --- source/Makefile | 5 +++ source/blender/Makefile | 6 ++- source/blender/collada/Makefile | 42 ++++++++++++++++++++ source/blender/windowmanager/intern/Makefile | 4 ++ source/nan_definitions.mk | 15 ++++++- source/nan_link.mk | 4 ++ 6 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 source/blender/collada/Makefile diff --git a/source/Makefile b/source/Makefile index 87843dfbfc9..2f935c91095 100644 --- a/source/Makefile +++ b/source/Makefile @@ -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 diff --git a/source/blender/Makefile b/source/blender/Makefile index 6bc874c3c93..1c4ff6935b9 100644 --- a/source/blender/Makefile +++ b/source/blender/Makefile @@ -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 index 00000000000..29a731dbcb2 --- /dev/null +++ b/source/blender/collada/Makefile @@ -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 diff --git a/source/blender/windowmanager/intern/Makefile b/source/blender/windowmanager/intern/Makefile index f4d65975d43..e472c87fe54 100644 --- a/source/blender/windowmanager/intern/Makefile +++ b/source/blender/windowmanager/intern/Makefile @@ -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 diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index 952b57601b7..24fe489a26c 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -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) diff --git a/source/nan_link.mk b/source/nan_link.mk index f28a07f06a9..54021ab016f 100644 --- a/source/nan_link.mk +++ b/source/nan_link.mk @@ -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)