Refactor the build to try and get as much material as possible out of SConstruct.

This commit is contained in:
Russel Winder
2009-08-28 14:10:24 +01:00
parent c311cf72e6
commit 9e894274a3
10 changed files with 85 additions and 79 deletions

View File

@@ -19,16 +19,17 @@
Import('environment', 'variant')
e = environment.Clone()
e.Append(CPPPATH = ['include', 'include/sys-' + variant + '/arch-' + environment['ARCH']])
e.Append(CCFLAGS = '-nostdinc')
source = \
Glob('src/*.c') + \
Glob('src/sys-' + variant + '/*.c') + \
Glob('src/sys-' + variant + '/arch-' + environment['ARCH'] + '/*.c') + \
Glob('src/sys-' + variant + '/arch-' + environment['ARCH'] + '/plat-' + environment['PLATFORM'] + '/*.c') + \
Glob('src/arch-' + environment['ARCH'] + '/*.c') + \
Glob('src/arch-' + environment['ARCH'] + '/*.S')
e = environment.Clone()
e.Append(CPPPATH = ['include', 'include/sys-' + variant + '/arch-' + environment['ARCH']])
Glob('src/sys-' + variant + '/arch-' + e['ARCH'] + '/*.c') + \
Glob('src/sys-' + variant + '/arch-' + e['ARCH'] + '/plat-' + e['PLATFORM'] + '/*.c') + \
Glob('src/arch-' + e['ARCH'] + '/*.c') + \
Glob('src/arch-' + e['ARCH'] + '/*.S')
objects = e.StaticObject(source)
Depends (objects, e['configFiles'])