mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
36 lines
870 B
Python
36 lines
870 B
Python
# -*- mode: python; coding: utf-8; -*-
|
|
#
|
|
# Codezero -- a microkernel for embedded systems.
|
|
#
|
|
# Copyright © 2009 B Labs Ltd
|
|
|
|
import os, sys, shelve
|
|
from os.path import join
|
|
from configure import *
|
|
|
|
config = configuration_retrieve()
|
|
arch = config.arch
|
|
platform = config.platform
|
|
|
|
# Get global paths
|
|
PROJRELROOT="../../../"
|
|
|
|
# Locally important paths are here
|
|
LIBC_PATH = '../c'
|
|
LIBC_LIBPATH = LIBC_PATH
|
|
LIBC_INCPATH = [join(LIBC_PATH, 'include'), \
|
|
join(LIBC_PATH, 'include/arch/' + arch)]
|
|
|
|
env = Environment(CC = config.user_toolchain + 'gcc',
|
|
CCFLAGS = ['-g', '-nostdinc', '-nostdlib', '-ffreestanding'],
|
|
LINKFLAGS = ['-nostdlib'],
|
|
ENV = {'PATH' : os.environ['PATH']},
|
|
LIBS = ['gcc','c-baremetal'],
|
|
LIBPATH = LIBC_LIBPATH,
|
|
CPPPATH = ['#include', LIBC_INCPATH] )
|
|
|
|
src = Glob("src/*.c")
|
|
|
|
libelf = env.StaticLibrary('elf', src)
|
|
|