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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libl4/] [SConscript] - Blame information for rev 2

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
#  This program is free software: you can redistribute it and/or modify it under the terms of the GNU
8
#  General Public License as published by the Free Software Foundation, either version 3 of the License, or
9
#  (at your option) any later version.
10
#
11
#  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
12
#  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
13
#  License for more details.
14
#
15
#  You should have received a copy of the GNU General Public License along with this program.  If not, see
16
#  .
17
#
18
#  Author: Russel Winder
19
 
20
import os, sys
21
 
22
PROJRELROOT = '../..'
23
 
24
sys.path.append(PROJRELROOT)
25
 
26
from config.projpaths import *
27
from configure import *
28
 
29
Import('env', 'arch', 'subarch')
30
 
31
config = configuration_retrieve()
32
 
33
LIBMEM_RELDIR = 'conts/libmem'
34
LIBMEM_DIR = join(PROJROOT, LIBMEM_RELDIR)
35
 
36
e = env.Clone()
37
e.Append(CPPPATH = ['include', 'include/l4lib/arch',
38
                    LIBMEM_DIR],
39
         CPPFLAGS = ' -include l4lib/macros.h ')
40
 
41
#Do we need to remove CPPFLAGS coming from top level env?
42
 
43
# Use os.path.walk(dirname, glob_by_walk, ['*.[cS]', filelist])
44
# To collect all files in the tree.
45
 
46
def glob_by_walk(arg, dirname, names):
47
    ext, imglist = arg
48
    files = glob.glob(join(dirname, ext))
49
    imglist.extend(files)
50
 
51
objects = e.StaticObject(Glob('src/*.c') + \
52
                         Glob('src/lib/*.c') + \
53
                         Glob('src/lib/cap/*.c')) + \
54
                         Glob('src/lib/thread/*.c') + \
55
                         Glob('src/arch/' + arch + '/exregs.c') + \
56
                         Glob('src/arch/' + arch + '/*.S') + \
57
                         Glob('src/arch/' + arch + '/' + subarch + '/*.[cS]')
58
 
59
library = e.StaticLibrary('l4', objects)
60
 
61
Return('library')

powered by: WebSVN 2.1.0

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