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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libdev/] [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
8
 
9
PROJRELROOT = '../..'
10
 
11
sys.path.append(PROJRELROOT)
12
 
13
from config.projpaths import *
14
from config.configuration import *
15
 
16
config = configuration_retrieve()
17
gcc_arch_flag = config.gcc_arch_flag
18
platform = config.platform
19
 
20
# We assume we are compiling for userspace.
21
# variant can be specified from cmdline using
22
# scons variant=xxx
23
variant = ARGUMENTS.get('variant', 'userspace')
24
print '\nCompiling for variant: ' + variant + '\n'
25
 
26
# To include setbit/clrbit functions
27
LIBL4_RELDIR = 'conts/libl4'
28
LIBL4_DIR = join(PROJROOT, LIBL4_RELDIR)
29
LIBL4_INC = join(LIBL4_DIR, 'include')
30
 
31
LIBC_RELDIR = 'conts/libc'
32
LIBC_DIR = join(PROJROOT, LIBC_RELDIR)
33
LIBC_INC = join(LIBC_DIR, 'include')
34
 
35
env = Environment(CC = config.toolchain_userspace + 'gcc',
36
                  CCFLAGS = ['-g', '-nostdlib', '-ffreestanding', '-std=gnu99', \
37
                     '-nostdinc', '-Wall', '-DVARIANT_' + variant.upper(), \
38
                     '-march=' + gcc_arch_flag, '-Werror'],
39
                  LINKFLAGS = ['-nostdlib'],
40
                  ASFLAGS = ['-D__ASSEMBLY__'],
41
                  ENV = {'PATH' : os.environ['PATH']},
42
                  CPPPATH = ['#include', LIBC_INC, LIBL4_INC, join(PROJROOT,'include')])
43
 
44
objects = []
45
objects += SConscript('uart/pl011/SConscript', duplicate=0, \
46
                      exports = {'platform' : platform, 'env' : env})
47
objects += SConscript('timer/sp804/SConscript', duplicate=0, \
48
                      exports = {'platform' : platform, 'env' : env})
49
objects += SConscript('kmi/pl050/SConscript', duplicate=0, \
50
                      exports = {'platform' : platform, 'env' : env})
51
objects += SConscript('clcd/pl110/SConscript', duplicate=0, \
52
                      exports = {'platform' : platform, 'env' : env})
53
 
54
objects += SConscript('uart/omap/SConscript', duplicate=0, \
55
                      exports = {'platform' : platform, 'env' : env})
56
objects += SConscript('timer/omap/SConscript', duplicate=0, \
57
                      exports = {'platform' : platform, 'env' : env})
58
 
59
library = env.StaticLibrary('libdev-' + variant, objects)

powered by: WebSVN 2.1.0

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