[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13289] trunk/blender: Fixing makefiles for binreloc I made it use flags like other
Kent Mein
mein at cs.umn.edu
Fri Jan 18 22:39:48 CET 2008
Revision: 13289
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13289
Author: sirdude
Date: 2008-01-18 22:39:47 +0100 (Fri, 18 Jan 2008)
Log Message:
-----------
Fixing makefiles for binreloc I made it use flags like other
things default on for linux. ideasman helped me get scons working.
Cmake still needs some love...
Kent
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/config/linux2-config.py
trunk/blender/extern/CMakeLists.txt
trunk/blender/extern/Makefile
trunk/blender/source/Makefile
trunk/blender/source/creator/CMakeLists.txt
trunk/blender/source/creator/Makefile
trunk/blender/source/creator/SConscript
trunk/blender/source/creator/creator.c
trunk/blender/source/nan_definitions.mk
trunk/blender/tools/btools.py
Added Paths:
-----------
trunk/blender/extern/binreloc/CMakeLists.txt
trunk/blender/extern/binreloc/Makefile
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/CMakeLists.txt 2008-01-18 21:39:47 UTC (rev 13289)
@@ -67,6 +67,7 @@
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF)
+OPTION(WITH_BINRELOC "Enable binreloc filepath support" OFF)
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
@@ -256,6 +257,9 @@
SET(FFMPEG_LIB avcodec-51 avformat-51 avutil-49)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+ SET(BINRELC ${LIBDIR}/binreloc)
+ SET(BINRELC_INC ${BINRELOC}/include)
+
SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
IF(WITH_OPENAL)
SET(LLIBS ${LLIBS} dxguid)
Modified: trunk/blender/config/linux2-config.py
===================================================================
--- trunk/blender/config/linux2-config.py 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/config/linux2-config.py 2008-01-18 21:39:47 UTC (rev 13289)
@@ -114,6 +114,8 @@
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+WITH_BF_BINRELOC = 'true'
+
# enable ffmpeg support
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
BF_FFMPEG = '#extern/ffmpeg'
Modified: trunk/blender/extern/CMakeLists.txt
===================================================================
--- trunk/blender/extern/CMakeLists.txt 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/extern/CMakeLists.txt 2008-01-18 21:39:47 UTC (rev 13289)
@@ -43,3 +43,6 @@
SUBDIRS(verse)
ENDIF(WITH_VERSE)
+if(WITH_BINRELOC)
+ SUBDIRS(binreloc)
+ENDIF(WITH_BINRELOC)
Modified: trunk/blender/extern/Makefile
===================================================================
--- trunk/blender/extern/Makefile 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/extern/Makefile 2008-01-18 21:39:47 UTC (rev 13289)
@@ -56,6 +56,10 @@
DIRS += bullet2
endif
+ifeq ($(WITH_BINRELOC), true)
+ DIRS += binreloc
+endif
+
TARGET =
ifneq ($(OS),irix)
TARGET=solid
Added: trunk/blender/extern/binreloc/CMakeLists.txt
===================================================================
--- trunk/blender/extern/binreloc/CMakeLists.txt (rev 0)
+++ trunk/blender/extern/binreloc/CMakeLists.txt 2008-01-18 21:39:47 UTC (rev 13289)
@@ -0,0 +1,26 @@
+# ***** 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 by The Blender Foundation
+# All rights reserved.
+#
+
+SET(INC ./include ${WINTAB_INC})
+ADD_DEFINITIONS(-DWITH_BINRELOC)
+FILE(GLOB SRC *.c)
+
+BLENDERLIB(binreloc "${SRC}" "${INC}")
+#, libtype=['core','player'], priority = [25,15] )
Added: trunk/blender/extern/binreloc/Makefile
===================================================================
--- trunk/blender/extern/binreloc/Makefile (rev 0)
+++ trunk/blender/extern/binreloc/Makefile 2008-01-18 21:39:47 UTC (rev 13289)
@@ -0,0 +1,37 @@
+#
+# ***** 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 by The Blender Foundation
+# All rights reserved.
+#
+#
+
+LIBNAME = binreloc
+DIR = $(OCGDIR)/extern/$(LIBNAME)
+
+include nan_definitions.mk
+
+CPPFLAGS += -I./include
+
+
+include nan_compile.mk
+
+
+install: all debug
+ @[ -d $(DIR) ] || mkdir $(DIR)
+ @[ -d $(DIR)/include ] || mkdir $(DIR)/include
+ @../../intern/tools/cpifdiff.sh include/*.h $(DIR)/include/
Modified: trunk/blender/source/Makefile
===================================================================
--- trunk/blender/source/Makefile 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/source/Makefile 2008-01-18 21:39:47 UTC (rev 13289)
@@ -173,6 +173,10 @@
COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a
endif
+ifeq ($(WITH_BINRELOC), true)
+ COMLIB += $(OCGDIR)/extern/binreloc/$(DEBUG_DIR)libbinreloc.a
+endif
+
ifeq ($(WITH_FREETYPE2), true)
COMLIB += $(OCGDIR)/blender/ftfont/$(DEBUG_DIR)libftfont.a
ifeq ($(OS), windows)
Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/source/creator/CMakeLists.txt 2008-01-18 21:39:47 UTC (rev 13289)
@@ -42,12 +42,17 @@
../blender/makesdna
../kernel/gen_messaging
../kernel/gen_system
+ ../../extern/binreloc/include
)
IF(WITH_QUICKTIME)
ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
+IF(WITH_BINRELOC)
+ ADD_DEFINITIONS(-DWITH_BINRELOC)
+endif(WITH_VINRELOC)
+
IF(YESIAMSTUPID)
ADD_DEFINITIONS(-DYESIAMSTUPID)
ENDIF(YESIAMSTUPID)
Modified: trunk/blender/source/creator/Makefile
===================================================================
--- trunk/blender/source/creator/Makefile 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/source/creator/Makefile 2008-01-18 21:39:47 UTC (rev 13289)
@@ -42,9 +42,7 @@
CPPFLAGS += -I../blender/render/extern/include
CPPFLAGS += -I../blender/radiosity/extern/include
-ifeq ($(OS),linux)
- CPPFLAGS += -I$(OCGDIR)/extern/binreloc/include
-endif
+
# two needed for the kernel
CPPFLAGS += -I../blender/imbuf
CPPFLAGS += -I../blender/makesdna
@@ -62,6 +60,10 @@
CPPFLAGS += -I$(NAN_QUICKTIME)/include -DWITH_QUICKTIME
endif
+ifeq ($(WITH_BINRELOC), true)
+ CPPFLAGS += -I$(OCGDIR)/extern/binreloc/include -DWITH_BINRELOC
+endif
+
ifeq ($(NAN_YESIAMSTUPID), true)
CPPFLAGS += -DYESIAMSTUPID
endif
Modified: trunk/blender/source/creator/SConscript
===================================================================
--- trunk/blender/source/creator/SConscript 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/source/creator/SConscript 2008-01-18 21:39:47 UTC (rev 13289)
@@ -15,7 +15,8 @@
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
-if env['OURPLATFORM'] == 'linux2':
- incs += ' ../../extern/binreloc/include'
+if env['WITH_BF_BINRELOC']==1:
+ incs += ' ../../extern/binreloc/include'
+ defs.append('WITH_BINRELOC')
env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 )
Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/source/creator/creator.c 2008-01-18 21:39:47 UTC (rev 13289)
@@ -97,7 +97,7 @@
# include <sys/rtprio.h>
#endif
-#ifdef __linux__
+#ifdef WITH_BINRELOC
#include "binreloc.h"
#endif
@@ -258,8 +258,7 @@
#endif
-#ifdef __linux__
- /* linux uses binrealoc to know its binary path */
+#ifdef WITH_BINRELOC
br_init( NULL );
#endif
Modified: trunk/blender/source/nan_definitions.mk
===================================================================
--- trunk/blender/source/nan_definitions.mk 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/source/nan_definitions.mk 2008-01-18 21:39:47 UTC (rev 13289)
@@ -416,6 +416,8 @@
# enable freetype2 support for text objects
export WITH_FREETYPE2 ?= true
+ export WITH_BINRELOC ?= true
+
# enable ffmpeg support
ifndef NAN_NO_FFMPEG
export WITH_FFMPEG ?= true
Modified: trunk/blender/tools/btools.py
===================================================================
--- trunk/blender/tools/btools.py 2008-01-18 17:03:43 UTC (rev 13288)
+++ trunk/blender/tools/btools.py 2008-01-18 21:39:47 UTC (rev 13289)
@@ -47,6 +47,7 @@
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC', 'BF_OPENGL_LINKFLAGS',
'WITH_BF_FTGL', 'BF_FTGL', 'BF_FTGL_INC', 'BF_FTGL_LIB',
'WITH_BF_PLAYER',
+ 'WITH_BF_BINRELOC',
'CFLAGS', 'CCFLAGS', 'CPPFLAGS',
'REL_CFLAGS', 'REL_CCFLAGS',
'C_WARN', 'CC_WARN', 'LLIBS', 'PLATFORM_LINKFLAGS',
@@ -300,6 +301,7 @@
(BoolOption('BF_SPLIT_SRC', 'Split src lib into several chunks if true', 'false')),
(BoolOption('WITHOUT_BF_INSTALL', 'dont install if true', 'false')),
(BoolOption('BF_FANCY', 'Enable fancy output if true', 'true')),
+ (BoolOption('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', 'true')),
) # end of opts.AddOptions()
More information about the Bf-blender-cvs
mailing list