Files
codezero/conts/userlibs/libl4/SConstruct
Bahadir Balban 6fa4884a5a Changes since April
Clean up of build directories.
Simplifications to capability model.
2010-06-01 15:08:13 +03:00

32 lines
1.0 KiB
Python

# -*- 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 scripts.config.projpaths import *
from scripts.config.configuration import *
config = configuration_retrieve()
gcc_arch_flag = config.gcc_arch_flag
builddir = join(BUILDDIR, LIBL4_RELDIR)
VariantDir(builddir, os.getcwd(), 0)
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__', '-march=' + gcc_arch_flag],
ENV = {'PATH' : os.environ['PATH']},
CPPPATH = ['#include', LIBC_INCLUDE, KERNEL_HEADERS, LIBMEM_INCLUDE],
CPPFLAGS = ' -include l4lib/macros.h ')
objects = SConscript('SConscript', exports = { 'env' : env }, duplicate=0, build_dir = builddir)