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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
LCGDIR = '../lib/windows'
|
LCGDIR = '#../lib/windows'
|
||||||
LIBDIR = '${LCGDIR}'
|
LIBDIR = '${LCGDIR}'
|
||||||
|
|
||||||
WITH_BF_VERSE = False
|
WITH_BF_VERSE = False
|
||||||
@@ -101,6 +101,9 @@ BF_SOLID = '#extern/solid'
|
|||||||
BF_SOLID_INC = '${BF_SOLID}'
|
BF_SOLID_INC = '${BF_SOLID}'
|
||||||
BF_SOLID_LIB = 'extern_solid'
|
BF_SOLID_LIB = 'extern_solid'
|
||||||
|
|
||||||
|
BF_WINTAB = LIBDIR + '/wintab'
|
||||||
|
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||||
|
|
||||||
# enable freetype2 support for text objects
|
# enable freetype2 support for text objects
|
||||||
BF_FREETYPE = LIBDIR + '/gcc/freetype'
|
BF_FREETYPE = LIBDIR + '/gcc/freetype'
|
||||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||||
|
@@ -23,7 +23,7 @@ if env['OURPLATFORM'] == 'linux2':
|
|||||||
cflags='-pthread'
|
cflags='-pthread'
|
||||||
incs += ' ../../../extern/binreloc/include'
|
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']
|
incs += ' ' + env['BF_PTHREADS_INC']
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core', 'intern', 'player'], priority = [85,150,195], compileflags =cflags )
|
env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core', 'intern', 'player'], priority = [85,150,195], compileflags =cflags )
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
/* for checking system threads - BLI_system_thread_count */
|
/* for checking system threads - BLI_system_thread_count */
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "Windows.h"
|
#include "windows.h"
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
@@ -18,9 +18,15 @@ makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
|
|||||||
'../../makesdna'])
|
'../../makesdna'])
|
||||||
|
|
||||||
if env['OURPLATFORM'] == 'linuxcross':
|
if env['OURPLATFORM'] == 'linuxcross':
|
||||||
makesdna_tool.Replace(CC='gcc')
|
USE_WINE = True # when cross compiling on linux 64bit this is useful
|
||||||
makesdna_tool.Replace(AR='ar')
|
else:
|
||||||
makesdna_tool.Replace(LINK='gcc')
|
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':
|
if sys.platform != 'cygwin':
|
||||||
makesdna_tool.Append (CCFLAGS = cflags)
|
makesdna_tool.Append (CCFLAGS = cflags)
|
||||||
@@ -43,7 +49,10 @@ dna_dict = dna.Dictionary()
|
|||||||
dna.Depends ('dna.c', makesdna)
|
dna.Depends ('dna.c', makesdna)
|
||||||
dna.Depends ('dna.c', header_files)
|
dna.Depends ('dna.c', header_files)
|
||||||
if env['OURPLATFORM'] != 'linuxcross':
|
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:
|
else:
|
||||||
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
|
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
|
||||||
obj = 'intern/dna.c'
|
obj = 'intern/dna.c'
|
||||||
|
@@ -75,7 +75,7 @@ if env['WITH_BF_FFMPEG']:
|
|||||||
if env['WITH_BF_OGG']:
|
if env['WITH_BF_OGG']:
|
||||||
defs.append('WITH_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']
|
incs += ' ' + env['BF_PTHREADS_INC']
|
||||||
|
|
||||||
if env['WITH_BF_VERSE']:
|
if env['WITH_BF_VERSE']:
|
||||||
|
@@ -109,7 +109,7 @@ def shlib_emitter(target, source, env):
|
|||||||
#JB """ I'm blindly susbstuting lines from the mingw.py
|
#JB """ I'm blindly susbstuting lines from the mingw.py
|
||||||
#JB file becase these lines cause python errors here. """
|
#JB file becase these lines cause python errors here. """
|
||||||
#JB shlib_action = SCons.Action.Action(shlib_generator,generator=1)
|
#JB shlib_action = SCons.Action.Action(shlib_generator,generator=1)
|
||||||
shlib_action = SCons.Action.CommandGenerator(shlib_generator)
|
shlib_action = SCons.Action.CommandGeneratorAction(shlib_generator)
|
||||||
|
|
||||||
res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
|
res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user