Files
codezero/loader/libs/elf/SConstruct
2010-03-30 20:15:39 +05:30

36 lines
872 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.toolchain_kernel + '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)