Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2008-01-19 00:39:47 +0300
committerKent Mein <mein@cs.umn.edu>2008-01-19 00:39:47 +0300
commit320ac3f0e289b2c4d8add38926913eb2d4809f55 (patch)
tree07a0aa4716ba36761135b5cc45c635c1b7036aad
parent3df9587b40b109b97fd674cc03ab6d1801ae3e24 (diff)
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
-rw-r--r--CMakeLists.txt4
-rw-r--r--config/linux2-config.py2
-rw-r--r--extern/CMakeLists.txt3
-rw-r--r--extern/Makefile4
-rw-r--r--extern/binreloc/CMakeLists.txt26
-rw-r--r--extern/binreloc/Makefile37
-rw-r--r--source/Makefile4
-rw-r--r--source/creator/CMakeLists.txt5
-rw-r--r--source/creator/Makefile8
-rw-r--r--source/creator/SConscript5
-rw-r--r--source/creator/creator.c5
-rw-r--r--source/nan_definitions.mk2
-rwxr-xr-xtools/btools.py2
13 files changed, 99 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0227c51f39d..16818b4a846 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,6 +67,7 @@ OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" OFF)
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 @@ IF(WIN32)
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)
diff --git a/config/linux2-config.py b/config/linux2-config.py
index 4bf7e755c49..abba0f97ef2 100644
--- a/config/linux2-config.py
+++ b/config/linux2-config.py
@@ -114,6 +114,8 @@ BF_ICONV_INC = '${BF_ICONV}/include'
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'
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index 0f07bde72d5..1842aa05246 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -43,3 +43,6 @@ IF(WITH_VERSE)
SUBDIRS(verse)
ENDIF(WITH_VERSE)
+if(WITH_BINRELOC)
+ SUBDIRS(binreloc)
+ENDIF(WITH_BINRELOC)
diff --git a/extern/Makefile b/extern/Makefile
index 04b282a8926..4ca63b6e7f9 100644
--- a/extern/Makefile
+++ b/extern/Makefile
@@ -56,6 +56,10 @@ ifneq ($(NAN_NO_KETSJI), true)
DIRS += bullet2
endif
+ifeq ($(WITH_BINRELOC), true)
+ DIRS += binreloc
+endif
+
TARGET =
ifneq ($(OS),irix)
TARGET=solid
diff --git a/extern/binreloc/CMakeLists.txt b/extern/binreloc/CMakeLists.txt
new file mode 100644
index 00000000000..ee4dccf4cda
--- /dev/null
+++ b/extern/binreloc/CMakeLists.txt
@@ -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] )
diff --git a/extern/binreloc/Makefile b/extern/binreloc/Makefile
new file mode 100644
index 00000000000..dbd093500a1
--- /dev/null
+++ b/extern/binreloc/Makefile
@@ -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/
diff --git a/source/Makefile b/source/Makefile
index ff5c6d5551e..793d38a08ad 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -173,6 +173,10 @@ ifeq ($(WITH_DDS), true)
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)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index a34ed069b02..7b9da71a501 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -42,12 +42,17 @@ INCLUDE_DIRECTORIES(../../intern/guardedalloc
../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)
diff --git a/source/creator/Makefile b/source/creator/Makefile
index 5fba2a1bb70..a7f2dfeecb6 100644
--- a/source/creator/Makefile
+++ b/source/creator/Makefile
@@ -42,9 +42,7 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
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 @@ ifeq ($(WITH_QUICKTIME), true)
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
diff --git a/source/creator/SConscript b/source/creator/SConscript
index b09229a1641..833b56eccd8 100644
--- a/source/creator/SConscript
+++ b/source/creator/SConscript
@@ -15,7 +15,8 @@ if env['WITH_BF_QUICKTIME']==1:
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 )
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 7e426288340..11065155f12 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -97,7 +97,7 @@
# include <sys/rtprio.h>
#endif
-#ifdef __linux__
+#ifdef WITH_BINRELOC
#include "binreloc.h"
#endif
@@ -258,8 +258,7 @@ int main(int argc, char **argv)
#endif
-#ifdef __linux__
- /* linux uses binrealoc to know its binary path */
+#ifdef WITH_BINRELOC
br_init( NULL );
#endif
diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk
index 246be668f5b..36b140c1ffb 100644
--- a/source/nan_definitions.mk
+++ b/source/nan_definitions.mk
@@ -416,6 +416,8 @@ endif
# 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
diff --git a/tools/btools.py b/tools/btools.py
index 9f5a028f845..913e086a792 100755
--- a/tools/btools.py
+++ b/tools/btools.py
@@ -47,6 +47,7 @@ def validate_arguments(args, bc):
'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 @@ def read_opts(cfg, args):
(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()