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
This commit is contained in:
@@ -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)
|
||||
|
@@ -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'
|
||||
|
3
extern/CMakeLists.txt
vendored
3
extern/CMakeLists.txt
vendored
@@ -43,3 +43,6 @@ IF(WITH_VERSE)
|
||||
SUBDIRS(verse)
|
||||
ENDIF(WITH_VERSE)
|
||||
|
||||
if(WITH_BINRELOC)
|
||||
SUBDIRS(binreloc)
|
||||
ENDIF(WITH_BINRELOC)
|
||||
|
4
extern/Makefile
vendored
4
extern/Makefile
vendored
@@ -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
|
||||
|
26
extern/binreloc/CMakeLists.txt
vendored
Normal file
26
extern/binreloc/CMakeLists.txt
vendored
Normal file
@@ -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] )
|
37
extern/binreloc/Makefile
vendored
Normal file
37
extern/binreloc/Makefile
vendored
Normal file
@@ -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/
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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 )
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user