diff options
| author | wuyangyong <[email protected]> | 2011-10-13 17:15:32 +0000 |
|---|---|---|
| committer | wuyangyong <[email protected]> | 2011-10-13 17:15:32 +0000 |
| commit | eb0af4e41ee1f7857fea77dde1ecf51bf902c9f9 (patch) | |
| tree | 36bc386d17af582fea59c442a366df230ff4fd11 /bsp/lpc178x/SConstruct | |
| parent | 1e06bb2726c1bdedbf5a962c2d81996358e3d186 (diff) | |
add lpc1788
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1759 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/lpc178x/SConstruct')
| -rw-r--r-- | bsp/lpc178x/SConstruct | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/bsp/lpc178x/SConstruct b/bsp/lpc178x/SConstruct new file mode 100644 index 0000000000..6b8bc35550 --- /dev/null +++ b/bsp/lpc178x/SConstruct @@ -0,0 +1,44 @@ +import os
+import sys
+import rtconfig
+
+RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
+sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
+from building import *
+
+TARGET = 'rtthread-lpc178x.' + rtconfig.TARGET_EXT
+
+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')
+
+# prepare building environment
+objs = PrepareBuilding(env, RTT_ROOT)
+
+if GetDepend('RT_USING_WEBSERVER'):
+ objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
+
+if GetDepend('RT_USING_RTGUI'):
+ objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
+
+cwd = str(Dir('#'))
+list = os.listdir(cwd)
+for d in list:
+ path = os.path.join(cwd, d)
+ if os.path.isfile(os.path.join(path, 'SConscript')):
+ objs = objs + SConscript(os.path.join(d, 'SConscript'))
+
+# libc testsuite
+# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
+
+# build program
+env.Program(TARGET, objs)
+
+# end building
+EndBuilding(TARGET)
|
