mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Simplified loader, elf, and c library SConscripts
This commit is contained in:
@@ -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
39
loader/libs/c/SConscript
Normal 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')
|
||||
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user