4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-28 02:47:06 +08:00

rename postlinker to rtmlinker && add post action

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@812 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
qiuyiuestc 2010-07-22 13:19:09 +00:00
parent 0a64bac9d9
commit 2c32bb90a4
2 changed files with 9 additions and 4 deletions

View File

@ -2,6 +2,9 @@ Import('env')
Import('projects')
Import('RTT_ROOT')
Import('rtconfig')
Import('TARGET')
RTMLINKER = RTT_ROOT + '/tools/rtmlinker.exe '
# group definitions
group = {}
@ -11,11 +14,14 @@ group['CCFLAGS'] = ''
group['CPPPATH'] = ['']
group['CPPDEFINES'] = ''
target = 'basicapp.mo'
target = 'basicapp.so'
POST_ACTION = RTMLINKER + '-l ' + TARGET + ' -o basicapp.mo ' + '$TARGET'
# add group to project list
projects.append(group)
src_local = Glob('basicapp.c')
env.Append(CCFLAGS = group['CCFLAGS'])
env.Append(CPPPATH = group['CPPPATH'])
env.Append(CPPDEFINES = group['CPPDEFINES'])
@ -23,7 +29,6 @@ module_env = env.Clone(CPPDEFINE = 'RT_MODULE')
module_env = env.Clone(CCFLAGS = ' -mcpu=arm920t -O0 -fPIC')
module_env.Replace(LINK = 'arm-none-eabi-ld')
module_env.Replace(LINKFLAGS = '-z max-page-size=0x4 -shared -fPIC -e rt_application_entry -nostdlib -s')
src_local = Glob('*.c')
module_env.Program(target, src_local)
module_env.AddPostAction(target, POST_ACTION)