|
|
@ -211,6 +211,9 @@ def options(opt): |
|
|
|
grp.add_option('--use-ccache', action = 'store_true', dest = 'CCACHE', default = False, |
|
|
|
grp.add_option('--use-ccache', action = 'store_true', dest = 'CCACHE', default = False, |
|
|
|
help = 'build using ccache [default: %default]') |
|
|
|
help = 'build using ccache [default: %default]') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
grp.add_option('--disable-warns', action = 'store_true', dest = 'DISABLE_WARNS', default = False, |
|
|
|
|
|
|
|
help = 'build using ccache [default: %default]') |
|
|
|
|
|
|
|
|
|
|
|
grp.add_option('--togles', action = 'store_true', dest = 'TOGLES', default = False, |
|
|
|
grp.add_option('--togles', action = 'store_true', dest = 'TOGLES', default = False, |
|
|
|
help = 'build engine with ToGLES [default: %default]') |
|
|
|
help = 'build engine with ToGLES [default: %default]') |
|
|
|
|
|
|
|
|
|
|
@ -252,16 +255,17 @@ def configure(conf): |
|
|
|
|
|
|
|
|
|
|
|
conf.load('force_32bit') |
|
|
|
conf.load('force_32bit') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if conf.options.DISABLE_WARNS: |
|
|
|
|
|
|
|
compiler_optional_flags = ['-w'] |
|
|
|
|
|
|
|
else: |
|
|
|
compiler_optional_flags = [ |
|
|
|
compiler_optional_flags = [ |
|
|
|
'-pipe', |
|
|
|
|
|
|
|
'-Wall', |
|
|
|
'-Wall', |
|
|
|
'-fdiagnostics-color=always', |
|
|
|
'-fdiagnostics-color=always', |
|
|
|
'-Wcast-align', |
|
|
|
'-Wcast-align', |
|
|
|
'-Wuninitialized', |
|
|
|
'-Wuninitialized', |
|
|
|
'-Winit-self', |
|
|
|
'-Winit-self', |
|
|
|
'-Wstrict-aliasing', |
|
|
|
'-Wstrict-aliasing', |
|
|
|
'-faligned-new' |
|
|
|
'-faligned-new', |
|
|
|
# '-Werror=strict-aliasing' |
|
|
|
|
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
c_compiler_optional_flags = [ |
|
|
|
c_compiler_optional_flags = [ |
|
|
@ -270,7 +274,9 @@ def configure(conf): |
|
|
|
|
|
|
|
|
|
|
|
cflags, linkflags = conf.get_optimization_flags() |
|
|
|
cflags, linkflags = conf.get_optimization_flags() |
|
|
|
|
|
|
|
|
|
|
|
flags = ['-fPIC'] #, '-fsanitize=undefined'] |
|
|
|
flags = ['-fPIC', '-pipe'] #, '-fsanitize=undefined', '-fno-sanitize=vptr'] #, '-fno-sanitize=vptr,shift,shift-exponent,shift-base,signed-integer-overflow'] |
|
|
|
|
|
|
|
if conf.env.COMPILER_CC != 'msvc': |
|
|
|
|
|
|
|
flags += ['-pthread'] |
|
|
|
|
|
|
|
|
|
|
|
if conf.env.DEST_OS == 'android': |
|
|
|
if conf.env.DEST_OS == 'android': |
|
|
|
flags += [ |
|
|
|
flags += [ |
|
|
@ -290,7 +296,7 @@ def configure(conf): |
|
|
|
if conf.env.DEST_OS != 'android': |
|
|
|
if conf.env.DEST_OS != 'android': |
|
|
|
flags += ['-march=native', '-mtune=native'] |
|
|
|
flags += ['-march=native', '-mtune=native'] |
|
|
|
else: |
|
|
|
else: |
|
|
|
flags += ['-march=native','-mtune=native','-mfpmath=sse', '-msse', '-msse2'] |
|
|
|
flags += ['-march=native','-mtune=native','-mfpmath=sse'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cflags += flags |
|
|
|
cflags += flags |
|
|
@ -307,7 +313,6 @@ def configure(conf): |
|
|
|
# for func in wrapfunctions: |
|
|
|
# for func in wrapfunctions: |
|
|
|
# linkflags += ['-Wl,--wrap='+func] |
|
|
|
# linkflags += ['-Wl,--wrap='+func] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conf.define('COMPILER_GCC', 1) |
|
|
|
conf.define('COMPILER_GCC', 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -315,7 +320,6 @@ def configure(conf): |
|
|
|
conf.check_cc(cflags=cflags, linkflags=linkflags, msg='Checking for required C flags') |
|
|
|
conf.check_cc(cflags=cflags, linkflags=linkflags, msg='Checking for required C flags') |
|
|
|
conf.check_cxx(cxxflags=cxxflags, linkflags=linkflags, msg='Checking for required C++ flags') |
|
|
|
conf.check_cxx(cxxflags=cxxflags, linkflags=linkflags, msg='Checking for required C++ flags') |
|
|
|
|
|
|
|
|
|
|
|
linkflags += ['-pthread'] |
|
|
|
|
|
|
|
conf.env.append_unique('CFLAGS', cflags) |
|
|
|
conf.env.append_unique('CFLAGS', cflags) |
|
|
|
conf.env.append_unique('CXXFLAGS', cxxflags) |
|
|
|
conf.env.append_unique('CXXFLAGS', cxxflags) |
|
|
|
conf.env.append_unique('LINKFLAGS', linkflags) |
|
|
|
conf.env.append_unique('LINKFLAGS', linkflags) |
|
|
@ -358,6 +362,19 @@ def configure(conf): |
|
|
|
conf.check(lib='opus', uselib_store='OPUS') |
|
|
|
conf.check(lib='opus', uselib_store='OPUS') |
|
|
|
# conf.check(lib='speex', uselib_store='SPEEX') |
|
|
|
# conf.check(lib='speex', uselib_store='SPEEX') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 'ivp/havana', |
|
|
|
|
|
|
|
# 'ivp/havana/havok/hk_base', |
|
|
|
|
|
|
|
# 'ivp/havana/havok/hk_math', |
|
|
|
|
|
|
|
# 'ivp/ivp_compact_builder', |
|
|
|
|
|
|
|
# 'ivp/ivp_physics', |
|
|
|
|
|
|
|
# conf.check(lib='ivp_physics', uselib_store='ivp_physics') |
|
|
|
|
|
|
|
# conf.check(lib='ivp_compactbuilder', uselib_store='ivp_compactbuilder') |
|
|
|
|
|
|
|
# conf.check(lib='havana_constraints', uselib_store='havana_constraints') |
|
|
|
|
|
|
|
# conf.check(lib='hk_math', uselib_store='hk_math') |
|
|
|
|
|
|
|
# conf.check(lib='hk_base', uselib_store='hk_base') |
|
|
|
|
|
|
|
# conf.check(lib='', uselib_store='') |
|
|
|
|
|
|
|
|
|
|
|
if conf.env.DEST_OS != 'win32': |
|
|
|
if conf.env.DEST_OS != 'win32': |
|
|
|
conf.check_cc(lib='dl', mandatory=False) |
|
|
|
conf.check_cc(lib='dl', mandatory=False) |
|
|
|
conf.check_cc(lib='bz2', mandatory=False) |
|
|
|
conf.check_cc(lib='bz2', mandatory=False) |
|
|
|