Browse Source

update bsp/simulator/SConscript to auto remove drivers according to rtconfig.h

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2420 bbd45198-f89e-11dd-88c7-29a3b14d5316
goprife@gmail.com 12 years ago
parent
commit
13d2e4a5ac
1 changed files with 8 additions and 4 deletions
  1. 8 4
      bsp/simulator/drivers/SConscript

+ 8 - 4
bsp/simulator/drivers/SConscript

@@ -4,10 +4,14 @@ cwd = GetCurrentDir()
 src = Glob('*.c')
 
 # remove no need file.
-if GetDepend('RT_USING_LWIP') == False:
-    SrcRemove(src, 'emac.c')
-if GetDepend('RT_USING_DFS') == False:
-    SrcRemove(src, 'sd.c')
+if GetDepend('RT_USING_RTGUI') == False:
+    SrcRemove(src, 'sdl_fb.c')
+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_DFS_UFFS') == False:
+    SrcRemove(src, 'nand_sim.c')
+if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_DFS_JFFS2') == False:
+    SrcRemove(src, 'sst25vfxx_mtd_sim.c')
 
 CPPPATH = [cwd]