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:
authorNathan Letwory <nathan@letworyinteractive.com>2006-03-13 14:42:49 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2006-03-13 14:42:49 +0300
commit36a4af22c38fae7eb5b6099215b4fd003d7573a5 (patch)
treeed60a35bd82f3985559fea05761c3437544e623d /source/blender/makesdna/intern/SConscript
parent34a5739a8a9e579b8e07eb06c0fad9f449d433e6 (diff)
==SCons==
* These changes bring cross-compiling Blender for Windows on Linux one step closer to reality. The 'biggest' change is in makesdna SConscript to make sure a linux native makesdna is built, that can be run, too. Next to that proper checks for env['OURPLATFORM']=='linuxcross' are added in various places. Switch change in pluginapi.c was necessary, and AFAIK it should work like that also on WIN32, if not, slap me. Note: everything *compiles* now nicely, it is just that the final *linking* doesn't work (yet). Anyone who fixes this will be the hero of cross-compilers :)
Diffstat (limited to 'source/blender/makesdna/intern/SConscript')
-rw-r--r--source/blender/makesdna/intern/SConscript14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index dab0625f50e..706e57c206d 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -7,7 +7,7 @@ cflags = ''
defines = []
root_build_dir=env['BF_BUILDDIR']
-source_files = ['makesdna.c']
+source_files = ['makesdna.c', '#intern/guardedalloc/intern/mallocn.c']
makesdna_tool = env.Copy()
dna = env.Copy()
@@ -16,16 +16,24 @@ makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" '
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
'../../makesdna'])
+if env['OURPLATFORM'] == 'linuxcross':
+ makesdna_tool.Replace(CC='gcc')
+ makesdna_tool.Replace(AR='ar')
+ makesdna_tool.Replace(LINK='gcc')
+
if sys.platform != 'cygwin':
makesdna_tool.Append (CCFLAGS = cflags)
makesdna_tool.Append (CPPDEFINES = defines)
makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib')
-makesdna_tool.Append (LIBS = 'bf_guardedalloc')
+
makesdna_tool.Program (target = '#'+root_build_dir+os.sep+'makesdna', source = source_files)
dna_dict = dna.Dictionary()
makesdna_name = root_build_dir+'/makesdna' + dna_dict['PROGSUFFIX']
dna.Depends ('dna.c', '#'+makesdna_name)
-dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
+if env['OURPLATFORM'] != 'linuxcross':
+ dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
+else:
+ dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
obj = 'intern/dna.c'
Return ('obj')