提交 1ab15ba0 编写于 作者: P prife

app module of simlator: simpliy command of building, now use `scons --def` to...

app module of simlator: simpliy command of building, now use `scons --def` to create rtthread.def which can used by msvc
上级 a07b4a43
...@@ -120,18 +120,18 @@ if GetDepend('RT_USING_MODULE'): ...@@ -120,18 +120,18 @@ if GetDepend('RT_USING_MODULE'):
AddOption('--def', AddOption('--def',
dest='def', dest='def',
nargs=1, type='string', action='store_true',
action='store', default=False,
metavar='DIR', help='create rthread.def of rtthread.dll on windows')
help='installation prefix') if GetOption('def'):
res = GetOption('def') if rtconfig.PLATFORM != 'mingw':
if res is None: print "scons error: `--def' can only work with mingw"
program = env.Program(TARGET, objs) exit(1)
elif res == 'update':
env['LINKFLAGS'] = rtconfig.DEFFILE_LFLAGS env['LINKFLAGS'] = rtconfig.DEFFILE_LFLAGS
env.SharedLibrary("rtthread.dll", objs) env.SharedLibrary("rtthread.dll", objs)
program = '' program = ''
elif res == 'yes': else:
if rtconfig.PLATFORM == 'cl': if rtconfig.PLATFORM == 'cl':
objs += ['rtthread.def'] objs += ['rtthread.def']
elif rtconfig.PLATFORM == 'mingw': elif rtconfig.PLATFORM == 'mingw':
...@@ -139,14 +139,8 @@ if GetDepend('RT_USING_MODULE'): ...@@ -139,14 +139,8 @@ if GetDepend('RT_USING_MODULE'):
# rtconfig.POST_ACTION = 'lib /machine:i386 /def:rtthread.def /out:rtthread.lib' # rtconfig.POST_ACTION = 'lib /machine:i386 /def:rtthread.def /out:rtthread.lib'
env.SharedLibrary("rtthread.dll", objs) env.SharedLibrary("rtthread.dll", objs)
program = env.Program(TARGET, 'dummy.c', LIBS='rtthread', LIBPATH='.') 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: else:
# env.SharedLibrary("rtthread.dll", objs)
program = env.Program(TARGET, objs) program = env.Program(TARGET, objs)
# end building # end building
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册