update module construction

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1422 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
qiuyiuestc@gmail.com
2011-05-23 01:04:03 +00:00
parent 477dec24b4
commit ea5421567c
39 changed files with 280 additions and 770 deletions
-40
View File
@@ -1,40 +0,0 @@
Import('env')
Import('projects')
Import('RTT_ROOT')
Import('rtconfig')
Import('TARGET')
RTMLINKER = RTT_ROOT + '/tools/rtmlinker.exe '
# group definitions
group = {}
group['CCFLAGS'] = ''
group['CPPPATH'] = [RTT_ROOT + '/include',
RTT_ROOT + '/examples/module',
RTT_ROOT + '/components/rtgui/include',
RTT_ROOT + '/components/rgtui/common',
RTT_ROOT + '/components/rtgui/server',
RTT_ROOT + '/components/rtgui/widgets']
group['CPPDEFINES'] = ''
target = 'tetris.so'
POST_ACTION = RTMLINKER + ' -l ' + TARGET + ' -o tetris.mo ' + '$TARGET'
# add group to project list
projects.append(group)
src_local = Split("""
application.c
tetris_ui.c
tetris_modal.c
tetris_view.c
""")
env.Append(CCFLAGS = group['CCFLAGS'])
env.Append(CPPPATH = group['CPPPATH'])
env.Append(CPPDEFINES = group['CPPDEFINES'])
module_env = env.Clone(CCFLAGS = ' -mcpu=arm920t -O0 -fPIC')
module_env.Replace(LINKFLAGS = '-z max-page-size=0x4 -shared -fPIC -e rt_application_init -nostdlib -s')
module_env.Program(target, src_local)
module_env.AddPostAction(target, POST_ACTION)
+31
View File
@@ -0,0 +1,31 @@
import os
import sys
EXEC_PATH = '/home/shaolin/CodeSourcery/Sourcery_G++_Lite/bin'
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
PREFIX = 'arm-none-eabi-'
env = Environment(tools = ['mingw'],
AS = PREFIX + 'gcc',
ASFLAGS = '',
CC = PREFIX + 'gcc',
CCFLAGS = '-mcpu=arm920t -O0 -fPIC' ,
AR = PREFIX + 'ar',
ARFLAGS = '-rc',
LINK = PREFIX + 'ld',
LINKFLAGS = '-z max-page-size=0x4 -shared -fPIC -e rt_application_init -nostdlib -s',
CPPPATH = [
RTT_ROOT + '/include',
RTT_ROOT + '/bsp/mini2440',
RTT_ROOT + '/components/rtgui/include',
RTT_ROOT + '/components/rgtui/common',
RTT_ROOT + '/components/rtgui/server',
RTT_ROOT + '/components/rtgui/widgets'
])
env.PrependENVPath('PATH', EXEC_PATH)
target = 'tetris.so'
src = Glob('*.c')
env.Program(target, src)