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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libc/] [SConscript] - Rev 2

Compare with Previous | Blame | View Log

# -*- mode: python; coding: utf-8; -*-
#
#  Codezero -- Virtualization microkernel for embedded systems.
#
#  Copyright © 2009  B Labs Ltd

import os, sys, shelve
from os.path import join

# Get global paths
PROJRELROOT = '../../../'

sys.path.append(PROJRELROOT)

from config.configuration import *
from config.projpaths import *

Import('env', 'arch', 'type')
variant = type

# Needed by fputc(), for declaration of uart_tx()
LIBDEV_RELDIR = 'conts/libdev'
LIBDEV_DIR = join(PROJROOT, LIBDEV_RELDIR)
LIBDEV_INC = join(LIBDEV_DIR, 'include')

e = env.Clone()
e.Append(CPPPATH = ['include', 'include/sys-' + variant + \
                    '/arch-' + arch, LIBDEV_INC],
         CCFLAGS = ['-nostdinc'])

source = \
        Glob('src/*.[cS]') + \
        Glob('src/sys-' + variant + '/*.c') + \
        Glob('src/sys-' + variant + '/arch-' + arch + '/*.c') + \
        Glob('src/arch-' + arch + '/*.c') + \
        Glob('src/arch-' + arch + '/*.S') + \
        Glob('crt/sys-' + variant + '/arch-' + arch + '/*.[cS]')

objects = e.StaticObject(source)
library = e.StaticLibrary('c-' + variant, objects)

Return('library')

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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