Top-level SConsctruct can now retrive shelved configuration

By moving shelve retrieval details to configuration_retrieve()
into configuration.py, the top-level SConstruct can now get full
configuration object from shelve.
This commit is contained in:
Bahadir Balban
2009-09-14 11:52:01 +03:00
parent 2f8df84cf2
commit dd04734491
4 changed files with 39 additions and 36 deletions

View File

@@ -17,16 +17,33 @@
#
# Author: Russel Winder
Import('environment')
import os, sys
e = environment.Clone()
e.Append(CPPPATH = ['include'])
PROJRELROOT = '../..'
sys.path.append(PROJRELROOT)
from config.projpaths import *
Import('arch')
env = Environment(CC = 'arm-none-linux-gnueabi-gcc',
CCFLAGS = ['-g', '-nostdlib', '-ffreestanding'],
LINKFLAGS = ['-nostdlib'],
ASFLAGS = ['-D__ASSEMBLY__'],
ENV = {'PATH' : os.environ['PATH']},
LIBS = 'gcc',
CPPPATH = ['#include', '#include/l4lib/arch', join(PROJROOT,'include') ])
def create_symlinks(arch):
if not os.path.exists("include/l4lib/arch"):
os.system("ln -s %s %s" % ("arch-" + arch, "include/l4lib/arch"))
# TODO: There are errors in this code that -Werror gives problems with.
e['CCFLAGS'] = ['-g', '-nostdlib', '-Wall', '-ffreestanding', '-std=gnu99']
objects = e.StaticObject(Glob('src/*.c') + Glob('src/' + e['ARCH'] + '/*.[cS]'))
library = e.StaticLibrary('l4', objects)
create_symlinks(arch)
objects = env.StaticObject(Glob('src/*.c') + Glob('src/' + arch + '/*.[cS]'))
library = env.StaticLibrary('l4', objects)
Return('library')