2019-09-11 09:09:36 +02:00
|
|
|
# SCsub
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
sources = [
|
2019-09-17 15:30:31 +02:00
|
|
|
"lportal_all.cpp",
|
2019-09-11 09:09:36 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
module_env = env.Clone()
|
2020-02-15 09:25:31 +01:00
|
|
|
# warning!! these command lines are linux only
|
2020-01-07 19:16:54 +01:00
|
|
|
#module_env.Append(CXXFLAGS=['-O2', '-std=c++11', '-Wno-sign-compare', '-Wno-strict-aliasing'])
|
2020-02-15 09:25:31 +01:00
|
|
|
#module_env.Append(CXXFLAGS=['-std=c++11', '-Wno-sign-compare', '-Wno-strict-aliasing'])
|
2019-09-11 09:09:36 +02:00
|
|
|
|
|
|
|
if ARGUMENTS.get('lportal_shared', 'no') == 'yes':
|
|
|
|
# Shared lib compilation
|
|
|
|
module_env.Append(CXXFLAGS='-fPIC')
|
|
|
|
module_env['LIBS'] = []
|
|
|
|
shared_lib = module_env.SharedLibrary(target='#bin/lportal', source=sources)
|
|
|
|
shared_lib_shim = shared_lib[0].name.rsplit('.', 1)[0]
|
|
|
|
env.Append(LIBS=[shared_lib_shim])
|
|
|
|
env.Append(LIBPATH=['#bin'])
|
|
|
|
else:
|
|
|
|
# Static compilation
|
|
|
|
module_env.add_source_files(env.modules_sources, sources)
|