summaryrefslogtreecommitdiff
path: root/bsp/simulator/SConstruct
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-11-16 04:28:24 +0000
committer[email protected] <[email protected]>2012-11-16 04:28:24 +0000
commit50d69f69f6f1114603fab3dba0c1bb79dac6f1e5 (patch)
tree8148212ca6d398860444151409f1560d51e777c8 /bsp/simulator/SConstruct
parent3012a3abb563c70fc2159c8e5bb4d260dc4a960e (diff)
update simulator/SConstruct
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2417 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/simulator/SConstruct')
-rw-r--r--bsp/simulator/SConstruct23
1 files changed, 14 insertions, 9 deletions
diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct
index 2ecec9ef28..b75c4b1159 100644
--- a/bsp/simulator/SConstruct
+++ b/bsp/simulator/SConstruct
@@ -9,8 +9,13 @@ else:
# 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 =''
+if os.getenv('RTT_RTGUI'):
+ RTT_RTGUI = os.getenv('RTT_RTGUI')
+else:
+ # set the rtgui root directory by hand
+ # empty string means use the RTGUI in svn
+ #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 *
@@ -52,14 +57,8 @@ env['LIBS']=libs
env['CPPDEFINES']=definitions
# 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)
+objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False, remove_components=['rtgui'])
if GetDepend('RT_USING_RTGUI'):
sdl_lib = ['SDL', 'SDLmain']
sdl_lib_path = os.path.normpath('SDL/lib/x86')
@@ -69,9 +68,15 @@ if GetDepend('RT_USING_RTGUI'):
env.Append(CPPPATH=sdl_include_path)
if RTT_RTGUI:
+ objs += SConscript(os.path.join(RTT_RTGUI + '/components/rtgui', 'SConscript'),
+ variant_dir='build/components/rtgui',
+ duplicate=0)
objs = objs + SConscript(RTT_RTGUI+'/demo/examples/SConscript',
variant_dir='build/examples/gui', duplicate=0)
else:
+ objs += SConscript(os.path.join(RTT_ROOT + '/components/rtgui', 'SConscript'),
+ variant_dir='build/components/rtgui',
+ duplicate=0)
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript',
variant_dir='build/examples/gui', duplicate=0)