Simplified loader, elf, and c library SConscripts

This commit is contained in:
Bahadir Balban
2009-09-14 19:15:32 +03:00
parent e08ab58b09
commit 0142677c81
5 changed files with 51 additions and 14 deletions

View File

@@ -9,16 +9,8 @@ from os.path import join
Import('env')
# Get global paths
PROJRELROOT = '../'
sys.path.append(PROJRELROOT)
e = env.Clone()
src = Glob('*.[cS]')
objs = e.Object(src)
objs = env.Object(src)
Return('objs')

39
loader/libs/c/SConscript Normal file
View File

@@ -0,0 +1,39 @@
# -*- 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
# Get global paths
PROJRELROOT = '../../../'
sys.path.append(PROJRELROOT)
from config.configuration import *
from config.projpaths import *
Import('env', 'arch', 'platform')
variant = 'baremetal'
e = env.Clone()
e.Append(CPPPATH = ['include/sys-' + variant + '/arch-' + arch])
e.Append(CCFLAGS = '-nostdinc')
source = \
Glob('src/*.c') + \
Glob('src/sys-' + variant + '/*.c') + \
Glob('src/sys-' + variant + '/arch-' + arch + '/*.c') + \
Glob('src/sys-' + variant + '/arch-' + arch + '/plat-' + platform + '/*.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')

View File

@@ -7,9 +7,7 @@
Import('env')
arch = 'arm'
e = env.Clone()
#e.Append(CPPPATH = ['include', '#libs/c/include', '#libs/c/include/arch/' + arch])
e.Append(CPPPATH = ['include'])
e.Append(CCFLAGS = '-nostdinc')