mirror of
https://github.com/drasko/codezero.git
synced 2026-01-29 19:23:14 +01:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user