OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [loader/] [libs/] [c/] [SConstruct] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
# -*- mode: python; coding: utf-8; -*-
2
#
3
#  Codezero -- a microkernel for embedded systems.
4
#
5
#  Copyright © 2009  B Labs Ltd
6
 
7
import os, sys, shelve
8
from configure import *
9
 
10
variant = "baremetal"
11
config = configuration_retrieve()
12
arch = config.arch
13
subarch = config.subarch
14
gcc_arch_flag = config.gcc_arch_flag
15
 
16
env = Environment(CC = config.toolchain_kernel + 'gcc',
17
                  # We don't use -nostdinc because sometimes we need standard headers,
18
                  # such as stdarg.h e.g. for variable args, as in printk().
19
                  CCFLAGS = ['-g', '-nostdlib', '-ffreestanding', '-std=gnu99', '-Wall', \
20
                     '-Werror', '-march=' + gcc_arch_flag],
21
                  LINKFLAGS = ['-nostdlib', '-T' + "include/l4/arch/arm/linker.lds"],
22
                  ASFLAGS = ['-D__ASSEMBLY__'],
23
                  PROGSUFFIX = '.elf',                  # The suffix to use for final executable
24
                  ENV = {'PATH' : os.environ['PATH']},  # Inherit shell path
25
                  LIBS = 'gcc',                         # libgcc.a - This is required for division routines.
26
                  CPPFLAGS = ['-include l4/config.h'])
27
 
28
e = env.Clone()
29
e.Append(CPPPATH = ['include/sys-' + variant + '/arch-' + arch])
30
e.Append(CCFLAGS = '-nostdinc')
31
 
32
source = \
33
        Glob('src/*.c') + \
34
        Glob('src/sys-' + variant + '/*.c') + \
35
        Glob('src/sys-' + variant + '/arch-' + arch + '/*.c') + \
36
        Glob('src/arch-' + arch + '/*.c') + \
37
        Glob('src/arch-' + arch + '/*.S') + \
38
        Glob('crt/sys-' + variant + '/arch-' + arch + '/*.[cS]')
39
 
40
objects = e.StaticObject(source)
41
library = e.StaticLibrary('c-' + variant, objects)
42
#runtime = e.StaticObject('crt/sys-' + variant + '/arch-' + arch + '/crt0.S')

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.