mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 22:03:16 +01:00
Refactor the build to try and get as much material as possible out of SConstruct.
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user