summaryrefslogtreecommitdiff
path: root/components/hello/SConscript
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2010-04-16 06:19:59 +0000
committerbernard.xiong <[email protected]>2010-04-16 06:19:59 +0000
commit04fa66ca3d781e516a6ac38c3b18c673ee16df04 (patch)
treec4474a51c65391c82258feda5b793a6890a48c61 /components/hello/SConscript
parentd7caff4d067892f51ec6a4ce47efeffab8ef1b76 (diff)
add module building script.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@627 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/hello/SConscript')
-rw-r--r--components/hello/SConscript8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/hello/SConscript b/components/hello/SConscript
index 5c3eccd149..215c4eb4cb 100644
--- a/components/hello/SConscript
+++ b/components/hello/SConscript
@@ -1,8 +1,10 @@
Import('env')
-src = ('hello.c')
+target = 'hello.mo'
-obj = env.Object(src)
+module_env = env.Clone(CPPDEFINE = 'RT_MODULE')
+module_env.Replace(LINKFLAGS = ' -r -d -e rtm_main -nostdlib')
-Return('obj')
+src_local = Glob('*.c')
+module_env.Program(target, src_local)