mirror of
https://github.com/drasko/codezero.git
synced 2026-03-15 08:41:50 +01:00
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
This commit is contained in:
42
loader/libs/elf/SConstruct
Normal file
42
loader/libs/elf/SConstruct
Normal file
@@ -0,0 +1,42 @@
|
||||
# -*- 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)
|
||||
|
||||
Reference in New Issue
Block a user