2019-09-11 09:09:36 +02:00
|
|
|
# SCsub
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"register_types.cpp",
|
|
|
|
"lroom.cpp",
|
|
|
|
"lroom_manager.cpp",
|
|
|
|
"lportal.cpp",
|
2019-09-12 20:53:24 +02:00
|
|
|
"lplanes_pool.cpp",
|
2019-09-13 20:15:25 +02:00
|
|
|
"ldob.cpp",
|
|
|
|
"lbitfield_dynamic.cpp",
|
2019-09-11 09:09:36 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
module_env = env.Clone()
|
|
|
|
module_env.Append(CXXFLAGS=['-O2', '-std=c++11'])
|
|
|
|
|
|
|
|
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)
|