summaryrefslogtreecommitdiff
path: root/bsp/simulator/SConstruct
diff options
context:
space:
mode:
authorprife <[email protected]>2013-10-01 17:43:38 +0800
committerprife <[email protected]>2013-10-14 22:53:59 +0800
commit5641360b4970de3afebe759117194556de6d2218 (patch)
tree298be29bd2017e6eb805652d4057215f48a5b6e2 /bsp/simulator/SConstruct
parentca9b83c68fcc2b841400a5f4c7728a111582ffb7 (diff)
simulator: add createdef.py to generate def file for VS
Now we can get rid off Mingw to create def file. To create def file, one should run: scons --def in the bsp/simulator.
Diffstat (limited to 'bsp/simulator/SConstruct')
-rwxr-xr-xbsp/simulator/SConstruct11
1 files changed, 5 insertions, 6 deletions
diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct
index 4db7328f2a..a95fe7d23f 100755
--- a/bsp/simulator/SConstruct
+++ b/bsp/simulator/SConstruct
@@ -122,13 +122,12 @@ if GetDepend('RT_USING_MODULE'):
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)
+ if rtconfig.PLATFORM == 'mingw':
+ env['LINKFLAGS'] = rtconfig.DEFFILE_LFLAGS
+ else:
+ rtconfig.POST_ACTION = 'createdef.py $TARGET rtthread.def'
- env['LINKFLAGS'] = rtconfig.DEFFILE_LFLAGS
- env.SharedLibrary("rtthread.dll", objs)
- program = ''
+ program = env.Program(TARGET, objs)
else:
if rtconfig.PLATFORM == 'cl':
objs += ['rtthread.def']