URL
https://opencores.org/ocsvn/c0or1k/c0or1k/trunk
Subversion Repositories c0or1k
[/] [c0or1k/] [trunk/] [conts/] [libl4/] [SConstruct] - Rev 3
Go to most recent revision | Compare with Previous | Blame | View Log
# -*- mode: python; coding: utf-8; -*-
#
# Codezero -- a microkernel for embedded systems.
#
# Copyright © 2009 B Labs Ltd
#
import os, sys
PROJRELROOT = '../..'
sys.path.append(PROJRELROOT)
from config.projpaths import *
from config.configuration import *
config = configuration_retrieve()
gcc_arch_flag = config.gcc_arch_flag
arch = config.arch
subarch = config.subarch
LIBMEM_RELDIR = 'conts/libmem'
LIBMEM_DIR = join(PROJROOT, LIBMEM_RELDIR)
LIBC_RELDIR = 'conts/libc'
LIBC_DIR = join(PROJROOT, LIBC_RELDIR)
LIBC_INC = join(LIBC_DIR, 'include')
env = Environment(CC = config.toolchain_userspace + 'gcc',
CCFLAGS = ['-g', '-nostdlib', '-ffreestanding', '-std=gnu99', \
'-nostdinc', '-Wall', '-Werror', '-march=' + gcc_arch_flag],
LINKFLAGS = ['-nostdlib'],
ASFLAGS = ['-D__ASSEMBLY__'],
ENV = {'PATH' : os.environ['PATH']},
CPPPATH = ['include', 'include/l4lib/arch', LIBC_INC, \
join(PROJROOT,'include'), LIBMEM_DIR],
CPPFLAGS = ' -include l4lib/macros.h ')
objects = env.StaticObject(Glob('src/*.c') + \
Glob('src/lib/*.c') + \
Glob('src/arch/' + arch + '/exregs.c') + \
Glob('src/arch/' + arch + '/*.[cS]') + \
Glob('src/arch/' + arch + '/' + subarch + '/*.[cS]') + \
Glob('src/lib/cap/*.c')) + \
Glob('src/lib/thread/*.c')
library = env.StaticLibrary('l4', objects)
Go to most recent revision | Compare with Previous | Blame | View Log