diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-11-14 02:12:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-11-14 02:12:38 +0300 |
commit | ff0c599c4b0c8d8a8e87081bf83f01eff7b5893b (patch) | |
tree | fce476b506e83645cb44c2b71d846d18aef3fd04 /source | |
parent | dc4ef17eea1a0dba1e9b9e99970005a394b1d37d (diff) |
update for compiling cross compiling win32 on linux, had a lot of trouble with makesdna, the only way I could build and link was as a
win32 binary.
Still unable to link blender.exe
and run with wine.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/SConscript | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/threads.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/intern/SConscript | 17 | ||||
-rw-r--r-- | source/blender/src/SConscript | 2 |
4 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript index 0dc28960492..829b39f4a61 100644 --- a/source/blender/blenlib/SConscript +++ b/source/blender/blenlib/SConscript @@ -23,7 +23,7 @@ if env['OURPLATFORM'] == 'linux2': cflags='-pthread' incs += ' ../../../extern/binreloc/include' -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'): incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core', 'intern', 'player'], priority = [85,150,195], compileflags =cflags ) diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index 9df8bbc81e3..07c02b8024f 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -42,7 +42,7 @@ /* for checking system threads - BLI_system_thread_count */ #ifdef WIN32 -#include "Windows.h" +#include "windows.h" #elif defined(__APPLE__) #include <sys/types.h> #include <sys/sysctl.h> diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index 0a2afd66dae..7d4f6d2d76b 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -18,9 +18,15 @@ 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') + USE_WINE = True # when cross compiling on linux 64bit this is useful +else: + USE_WINE = False + +if not USE_WINE: + 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) @@ -43,7 +49,10 @@ dna_dict = dna.Dictionary() dna.Depends ('dna.c', makesdna) dna.Depends ('dna.c', header_files) if env['OURPLATFORM'] != 'linuxcross': - dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET") + if USE_WINE: + dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET") + else: + 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' diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index 2759e8ca7ff..c5edd711d0a 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -75,7 +75,7 @@ if env['WITH_BF_FFMPEG']: if env['WITH_BF_OGG']: defs.append('WITH_OGG') -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'): incs += ' ' + env['BF_PTHREADS_INC'] if env['WITH_BF_VERSE']: |