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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-12 06:02:53 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-12 06:02:53 +0400
commit94ae0232b0337ab70cecaef03cd845887cd36eaa (patch)
treecaea2819c7fe0400fb91c9bdf0e99a9e0fd50cf6 /SConstruct
parent9a109c22ae1ef8a5c75932d661610b23ec685bd7 (diff)
parentf68e9db583489d541d535791536ea20bc1ae1d76 (diff)
Merged changes in the trunk up to revision 53729.
Conflicts resolved: release/datafiles/startup.blend source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct63
1 files changed, 42 insertions, 21 deletions
diff --git a/SConstruct b/SConstruct
index a16805bbfaf..171ebc8ddef 100644
--- a/SConstruct
+++ b/SConstruct
@@ -276,6 +276,11 @@ if 'blenderlite' in B.targets:
if k not in B.arguments:
env[k] = v
+if 'cudakernels' in B.targets:
+ env['WITH_BF_CYCLES'] = True
+ env['WITH_BF_CYCLES_CUDA_BINARIES'] = True
+ env['WITH_BF_PYTHON'] = False
+
# Extended OSX_SDK and 3D_CONNEXION_CLIENT_LIBRARY and JAckOSX detection for OSX
if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
@@ -652,6 +657,7 @@ datafileslist = []
datafilestargetlist = []
dottargetlist = []
scriptinstall = []
+cubininstall = []
if env['OURPLATFORM']!='darwin':
dotblenderinstall = []
@@ -745,29 +751,30 @@ if env['OURPLATFORM']!='darwin':
source=['intern/cycles/doc/license/'+s for s in source]
scriptinstall.append(env.Install(dir=dir,source=source))
- # cuda binaries
- if env['WITH_BF_CYCLES_CUDA_BINARIES']:
- dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib')
- for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
- kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel')
- cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
- scriptinstall.append(env.Install(dir=dir,source=cubin_file))
+ if env['WITH_BF_CYCLES']:
+ # cuda binaries
+ if env['WITH_BF_CYCLES_CUDA_BINARIES']:
+ dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib')
+ for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
+ kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel')
+ cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
+ cubininstall.append(env.Install(dir=dir,source=cubin_file))
- # osl shaders
- if env['WITH_BF_CYCLES_OSL']:
- dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'shader')
+ # osl shaders
+ if env['WITH_BF_CYCLES_OSL']:
+ dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'shader')
- osl_source_dir = Dir('./intern/cycles/kernel/shaders').srcnode().path
- oso_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel/shaders')
+ osl_source_dir = Dir('./intern/cycles/kernel/shaders').srcnode().path
+ oso_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel/shaders')
- headers='node_color.h node_fresnel.h node_texture.h oslutil.h stdosl.h'.split()
- source=['intern/cycles/kernel/shaders/'+s for s in headers]
- scriptinstall.append(env.Install(dir=dir,source=source))
+ headers='node_color.h node_fresnel.h node_texture.h oslutil.h stdosl.h'.split()
+ source=['intern/cycles/kernel/shaders/'+s for s in headers]
+ scriptinstall.append(env.Install(dir=dir,source=source))
- for f in os.listdir(osl_source_dir):
- if f.endswith('.osl'):
- oso_file = os.path.join(oso_build_dir, f.replace('.osl', '.oso'))
- scriptinstall.append(env.Install(dir=dir,source=oso_file))
+ for f in os.listdir(osl_source_dir):
+ if f.endswith('.osl'):
+ oso_file = os.path.join(oso_build_dir, f.replace('.osl', '.oso'))
+ scriptinstall.append(env.Install(dir=dir,source=oso_file))
if env['WITH_BF_OCIO']:
colormanagement = os.path.join('release', 'datafiles', 'colormanagement')
@@ -862,9 +869,9 @@ textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
if env['OURPLATFORM']=='darwin':
allinstall = [blenderinstall, textinstall]
elif env['OURPLATFORM']=='linux':
- allinstall = [blenderinstall, dotblenderinstall, scriptinstall, textinstall, iconinstall]
+ allinstall = [blenderinstall, dotblenderinstall, scriptinstall, textinstall, iconinstall, cubininstall]
else:
- allinstall = [blenderinstall, dotblenderinstall, scriptinstall, textinstall]
+ allinstall = [blenderinstall, dotblenderinstall, scriptinstall, textinstall, cubininstall]
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources = []
@@ -994,6 +1001,20 @@ buildslave_alias = env.Alias('buildslave', buildslave_cmd)
Depends(buildslave_cmd, allinstall)
+cudakernels_action = env.Action(btools.cudakernels, btools.cudakernels_print)
+cudakernels_cmd = env.Command('cudakernels_exec', None, cudakernels_action)
+cudakernels_alias = env.Alias('cudakernels', cudakernels_cmd)
+
+cudakernel_dir = os.path.join(os.path.abspath(os.path.normpath(B.root_build_dir)), 'intern/cycles/kernel')
+cuda_kernels = []
+
+for x in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
+ cubin = os.path.join(cudakernel_dir, 'kernel_' + x + '.cubin')
+ cuda_kernels.append(cubin)
+
+Depends(cudakernels_cmd, cuda_kernels)
+Depends(cudakernels_cmd, cubininstall)
+
Default(B.program_list)
if not env['WITHOUT_BF_INSTALL']: