summaryrefslogtreecommitdiff
path: root/bsp/simulator
diff options
context:
space:
mode:
authorprife <[email protected]>2013-02-27 02:27:19 +0800
committerprife <[email protected]>2013-02-27 02:27:19 +0800
commit1ab15ba0a6cdf6f6a8a7c61dc8032090339decee (patch)
treed587ef5bafb5c582d3355ec2a6946226416e0441 /bsp/simulator
parenta07b4a43965f8d9edc57490ca5ab03d976d8d3a2 (diff)
app module of simlator: simpliy command of building, now use `scons --def` to create rtthread.def which can used by msvc
Diffstat (limited to 'bsp/simulator')
-rwxr-xr-xbsp/simulator/SConstruct24
1 files changed, 9 insertions, 15 deletions
diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct
index 4514e850e4..f4d21eeee2 100755
--- a/bsp/simulator/SConstruct
+++ b/bsp/simulator/SConstruct
@@ -120,18 +120,18 @@ if GetDepend('RT_USING_MODULE'):
AddOption('--def',
dest='def',
- nargs=1, type='string',
- action='store',
- metavar='DIR',
- help='installation prefix')
- res = GetOption('def')
- if res is None:
- program = env.Program(TARGET, objs)
- elif res == 'update':
+ action='store_true',
+ default=False,
+ help='create rthread.def of rtthread.dll on windows')
+ if GetOption('def'):
+ if rtconfig.PLATFORM != 'mingw':
+ print "scons error: `--def' can only work with mingw"
+ exit(1)
+
env['LINKFLAGS'] = rtconfig.DEFFILE_LFLAGS
env.SharedLibrary("rtthread.dll", objs)
program = ''
- elif res == 'yes':
+ else:
if rtconfig.PLATFORM == 'cl':
objs += ['rtthread.def']
elif rtconfig.PLATFORM == 'mingw':
@@ -139,14 +139,8 @@ if GetDepend('RT_USING_MODULE'):
# rtconfig.POST_ACTION = 'lib /machine:i386 /def:rtthread.def /out:rtthread.lib'
env.SharedLibrary("rtthread.dll", objs)
program = env.Program(TARGET, 'dummy.c', LIBS='rtthread', LIBPATH='.')
- else:
- print "bad arguments, you can use the following command:"
- print "\t --def=update to create .def"
- print "\t --def=yes to create final exe"
- exit()
else:
- # env.SharedLibrary("rtthread.dll", objs)
program = env.Program(TARGET, objs)
# end building