diff options
| author | qiuyiuestc <[email protected]> | 2010-11-21 23:12:42 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-11-21 23:12:42 +0000 |
| commit | 5f838f86aabed563975deb7cf01c04b96e1df0c8 (patch) | |
| tree | 69e887cf0f79b565cbc6dc1cb8993a3fe0e7c889 /components/module/extapp/SConscript | |
| parent | 03951e4e38690ee0505c628156d9546142cb148c (diff) | |
add libdl and extension examples
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1080 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/module/extapp/SConscript')
| -rw-r--r-- | components/module/extapp/SConscript | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/components/module/extapp/SConscript b/components/module/extapp/SConscript new file mode 100644 index 0000000000..c3af53aba2 --- /dev/null +++ b/components/module/extapp/SConscript @@ -0,0 +1,34 @@ +Import('env') +Import('projects') +Import('RTT_ROOT') +Import('rtconfig') +Import('TARGET') + +RTMLINKER = RTT_ROOT + '/tools/rtmlinker.exe ' + +# group definitions +group = {} +group['name'] = 'examples' +group['src'] = Glob('*.c') +group['CCFLAGS'] = '' +group['CPPPATH'] = [RTT_ROOT + '/include', RTT_ROOT + '/components/module', RTT_ROOT + '/components/libdl'] +group['CPPDEFINES'] = '' + +target = 'extapp.so' +POST_ACTION = RTMLINKER + '-l ' + TARGET + ' -o extapp.mo ' + '$TARGET' + +# add group to project list +projects.append(group) + +src_local = Glob('extapp.c') + +env.Append(CCFLAGS = group['CCFLAGS']) +env.Append(CPPPATH = group['CPPPATH']) +env.Append(CPPDEFINES = group['CPPDEFINES']) +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') +module_env.Program(target, src_local) +module_env.AddPostAction(target, POST_ACTION) + |
