simulator: move SDL setting staff into drivers/SConstruct

This could not only make a cleaner SConstruct, but could also benefit
RTGUI building.
This commit is contained in:
Grissiom
2013-09-06 21:49:53 +08:00
parent 3ebc766521
commit c6e81b58d9
2 changed files with 11 additions and 10 deletions
+11 -3
View File
@@ -3,10 +3,19 @@ from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
LIBS = []
LIBPATH = []
CPPPATH = [cwd]
# remove no need file.
if GetDepend('RT_USING_RTGUI') == False:
SrcRemove(src, 'sdl_fb.c')
else:
LIBS.append('SDL')
if sys.platform == 'win32':
LIBPATH.append(os.path.abspath(os.path.join(cwd, '../SDL/lib/x86')))
CPPPATH.append(os.path.abspath(os.path.join(cwd, '../SDL/include')))
if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_DFS_ELMFAT') == False:
SrcRemove(src, 'sd_sim.c')
if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MTD_NAND') == False:
@@ -20,8 +29,7 @@ if GetDepend('RT_USING_MODULE') == False:
if sys.platform[0:5]=="linux": #check whether under linux
SrcRemove(src, ['module_win32.c', 'dfs_win32.c'])
CPPPATH = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
group = DefineGroup('Drivers', src, depend = [''],
CPPPATH = CPPPATH, LIBS=LIBS, LIBPATH=LIBPATH)
Return('group')