add has_libcpu option in PrepareBuilding function.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1461 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2011-06-07 16:13:00 +00:00
parent e540ac977c
commit d84cef41c4
1 changed files with 4 additions and 3 deletions

View File

@ -244,7 +244,7 @@ class Win32Spawn:
print data
return 0
def PrepareBuilding(env, root_directory):
def PrepareBuilding(env, root_directory, has_libcpu=False):
import SCons.cpp
import rtconfig
@ -273,7 +273,7 @@ def PrepareBuilding(env, root_directory):
PreProcessor.process_contents(contents)
BuildOptions = PreProcessor.cpp_namespace
if (GetDepend('RT_USING_NEWLIB') == False) and rtconfig.PLATFORM == 'gcc':
if (GetDepend('RT_USING_NEWLIB') == False and GetDepend('RT_USING_NOLIBC') == False) and rtconfig.PLATFORM == 'gcc':
AddDepend('RT_USING_MINILIBC')
# add target option
@ -295,6 +295,7 @@ def PrepareBuilding(env, root_directory):
# include kernel
objs.append(SConscript('src/SConscript', variant_dir='build/src', duplicate=0))
# include libcpu
if not has_libcpu:
objs.append(SConscript('libcpu/SConscript', variant_dir='build/libcpu', duplicate=0))
# include components
objs.append(SConscript('components/SConscript', variant_dir='build/components', duplicate=0))