diff --git a/components/SConscript b/components/SConscript index 517e80b11f..580b7e19e1 100644 --- a/components/SConscript +++ b/components/SConscript @@ -1,11 +1,14 @@ # for module compiling import os Import('RTT_ROOT') +Import('remove_components') objs = [] list = os.listdir(os.path.join(RTT_ROOT, 'components')) for d in list: + if d in remove_components: + continue path = os.path.join(RTT_ROOT, 'components', d) if os.path.isfile(os.path.join(path, 'SConscript')): objs = objs + SConscript(os.path.join(d, 'SConscript')) diff --git a/tools/building.py b/tools/building.py index 9f54a6ceac..c520f402c3 100644 --- a/tools/building.py +++ b/tools/building.py @@ -58,7 +58,7 @@ def GetVersion(): return '0.%d.%d' % (version, subversion) -def PrepareBuilding(env, root_directory, has_libcpu=False): +def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = []): import SCons.cpp import rtconfig @@ -122,8 +122,12 @@ def PrepareBuilding(env, root_directory, has_libcpu=False): # include libcpu if not has_libcpu: objs.append(SConscript(Rtt_Root + '/libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)) + # include components - objs.append(SConscript(Rtt_Root + '/components/SConscript', variant_dir='build/components', duplicate=0)) + objs.append(SConscript(Rtt_Root + '/components/SConscript', + variant_dir='build/components', + duplicate=0, + exports='remove_components')) return objs