2009-12-11 09:42:01 +00:00
|
|
|
import os
|
2010-04-19 05:42:12 +00:00
|
|
|
import sys
|
2009-12-11 09:42:01 +00:00
|
|
|
import rtconfig
|
|
|
|
|
2011-03-12 00:06:08 +00:00
|
|
|
if os.getenv('RTT_ROOT'):
|
|
|
|
RTT_ROOT = os.getenv('RTT_ROOT')
|
|
|
|
else:
|
|
|
|
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
|
|
|
|
2010-04-19 05:42:12 +00:00
|
|
|
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
2010-11-20 12:31:00 +00:00
|
|
|
from building import *
|
2010-04-19 05:42:12 +00:00
|
|
|
|
2010-11-20 12:31:00 +00:00
|
|
|
TARGET = 'rtthread-mini2440.' + rtconfig.TARGET_EXT
|
2010-08-03 08:50:06 +00:00
|
|
|
|
2009-12-11 09:42:01 +00:00
|
|
|
env = Environment(tools = ['mingw'],
|
|
|
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
|
|
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
2011-05-16 00:29:28 +00:00
|
|
|
CXX = rtconfig.CXX,
|
2009-12-11 09:42:01 +00:00
|
|
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
|
|
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
|
|
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
|
|
|
|
|
|
|
Export('RTT_ROOT')
|
|
|
|
Export('rtconfig')
|
|
|
|
|
2011-05-16 00:29:28 +00:00
|
|
|
# prepare building environment
|
2011-05-23 01:46:59 +00:00
|
|
|
objs = PrepareBuilding(env, RTT_ROOT)
|
2009-12-27 13:17:09 +00:00
|
|
|
|
2010-11-20 12:31:00 +00:00
|
|
|
if GetDepend('RT_USING_RTGUI'):
|
2011-05-23 01:46:59 +00:00
|
|
|
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
2009-12-29 15:08:26 +00:00
|
|
|
|
2010-11-20 12:31:00 +00:00
|
|
|
# libc testsuite
|
2011-05-23 01:46:59 +00:00
|
|
|
# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
|
2009-12-11 09:42:01 +00:00
|
|
|
|
2010-11-20 12:31:00 +00:00
|
|
|
# build program
|
2011-05-23 01:46:59 +00:00
|
|
|
env.Program(TARGET, objs)
|
2010-04-16 06:19:24 +00:00
|
|
|
|
2010-11-20 12:31:00 +00:00
|
|
|
# end building
|
|
|
|
EndBuilding(TARGET)
|