2009-12-29 17:12:53 +08:00
|
|
|
import os
|
2010-11-22 15:21:28 +08:00
|
|
|
import sys
|
2009-12-29 17:12:53 +08:00
|
|
|
import rtconfig
|
|
|
|
|
|
|
|
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
2010-11-22 15:21:28 +08:00
|
|
|
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
|
|
|
from building import *
|
2009-12-29 17:12:53 +08:00
|
|
|
|
2011-12-20 17:11:13 +08:00
|
|
|
TARGET = 'rtthread-lpc24xx.' + rtconfig.TARGET_EXT
|
2009-12-29 17:12:53 +08:00
|
|
|
|
|
|
|
env = Environment(tools = ['mingw'],
|
|
|
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
|
|
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
|
|
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
|
|
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
|
|
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
|
|
|
|
|
|
|
Export('RTT_ROOT')
|
|
|
|
Export('rtconfig')
|
|
|
|
|
2010-11-22 15:21:28 +08:00
|
|
|
# prepare building environment
|
2011-12-20 17:11:13 +08:00
|
|
|
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
2009-12-29 17:12:53 +08:00
|
|
|
|
2010-11-22 15:21:28 +08:00
|
|
|
# build program
|
2009-12-29 17:12:53 +08:00
|
|
|
env.Program(TARGET, objs)
|
2010-11-22 15:21:28 +08:00
|
|
|
|
|
|
|
# end building
|
|
|
|
EndBuilding(TARGET)
|