diff options
| author | [email protected] <[email protected]> | 2012-11-15 16:31:51 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-11-15 16:31:51 +0000 |
| commit | 3112b09c8f37a430a206af50e93f6bbbf419b430 (patch) | |
| tree | 6a34e298ed2b0293720190b520af21c5a6e598d4 /bsp/simulator/SConstruct | |
| parent | 518f29e55b8dd924c0cf36e77dd0e5092dfb0421 (diff) | |
add sdl driver for simulator; update scripts in simulator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2415 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/simulator/SConstruct')
| -rw-r--r-- | bsp/simulator/SConstruct | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct index 77e91565cd..2ecec9ef28 100644 --- a/bsp/simulator/SConstruct +++ b/bsp/simulator/SConstruct @@ -7,6 +7,11 @@ if os.getenv('RTT_ROOT'): else:
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
+# if you want use the rtgui in the svn (in google code), you should
+# comment the following line
+RTT_RTGUI = os.path.normpath('F:/Project/git/rt-gui')
+#RTT_RTGUI =''
+
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
from building import *
@@ -17,8 +22,6 @@ env = Environment() Export('RTT_ROOT')
Export('rtconfig')
-# prepare building environment
-
libs = Split('''
kernel32
msvcrt
@@ -48,13 +51,29 @@ env.Append(LINKFLAGS=rtconfig.LFLAGS) env['LIBS']=libs
env['CPPDEFINES']=definitions
-objs = PrepareBuilding(env, RTT_ROOT)
-
-# firemare library building script
-# objs = objs + SConscript( GetCurrentDir() + '/Libraries/SConscript', variant_dir='build/bsp/Libraries', duplicate=0)
+# prepare building environment
+if RTT_RTGUI:
+ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False, remove_components=['rtgui'])
+ objs += SConscript(os.path.join(RTT_RTGUI + '/components/rtgui', 'SConscript'),
+ variant_dir='build/components/rtgui',
+ duplicate=0)
+else:
+ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
if GetDepend('RT_USING_RTGUI'):
- objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
+ sdl_lib = ['SDL', 'SDLmain']
+ sdl_lib_path = os.path.normpath('SDL/lib/x86')
+ sdl_include_path = os.path.normpath('SDL/include')
+ env.Append(LIBS=sdl_lib)
+ env.Append(LIBPATH=sdl_lib_path)
+ env.Append(CPPPATH=sdl_include_path)
+
+ if RTT_RTGUI:
+ objs = objs + SConscript(RTT_RTGUI+'/demo/examples/SConscript',
+ variant_dir='build/examples/gui', duplicate=0)
+ else:
+ objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript',
+ variant_dir='build/examples/gui', duplicate=0)
# build program
env.Program(TARGET, objs)
|
