Files
codezero/loader/libs/elf/SConstruct
Bahadir Balban 59f30a175a More progress on build scripts
Created a config directory for configuration files.
Moved all absolute path variables to a projpaths.py file
All scripts can now universally learn absolute paths via projpaths.py
Moved the config_symbols class to the configuration.py file.
Moved libs to loader since they are only referred by the loader
2009-09-12 13:42:30 +03:00

43 lines
1.1 KiB
Python

# -*- mode: python; coding: utf-8; -*-
#
# Codezero -- a microkernel for embedded systems.
#
# Copyright © 2009 B Labs Ltd
import os, sys, shelve
# Get global paths
PROJRELROOT="../../../"
cwd = os.getcwd()
os.chdir(PROJRELROOT)
execfile("configure.py")
os.chdir(cwd)
# Get configuration information
config_shelve = shelve.open(CONFIG_SHELVE)
#symbols = config_shelve["config_symbols"]
arch = config_shelve["arch"]
subarch = config_shelve["subarch"]
platform = config_shelve["platform"]
all_syms = config_shelve["all_symbols"]
# 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 = 'arm-none-linux-gnueabi-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)