From 82ba62a78fff70da31385ecb93fd925db8e16dc3 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Tue, 28 Jul 2009 16:49:16 +0100 Subject: [PATCH] Add compilation of the Elf code. --- SConstruct | 2 ++ libs/elf/SConscript | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 libs/elf/SConscript diff --git a/SConstruct b/SConstruct index b7510c4..e9ff77e 100644 --- a/SConstruct +++ b/SConstruct @@ -37,3 +37,5 @@ libs = { } crts = { } for variant in [ 'baremetal' , 'userspace' ] : ( libs[variant] , crts[variant] ) = SConscript ( 'libs/c/SConscript' , variant_dir = 'build/lib/c/' + variant , duplicate = 0 , exports = { 'variant' : variant } ) + +libelf = SConscript ( 'libs/elf/SConscript' , variant_dir = 'build/lib/elf' , duplicate = 0 , exports = { 'lib' : libs['baremetal'] } ) diff --git a/libs/elf/SConscript b/libs/elf/SConscript new file mode 100644 index 0000000..1b9611f --- /dev/null +++ b/libs/elf/SConscript @@ -0,0 +1,29 @@ +# -*- mode: python; coding: utf-8; -*- + +# Codezero -- a microkernel for embedded systems. +# +# Copyright © 2009 Russel Winder +# +# This program is free software: you can redistribute it and/or modify it under the terms of the GNU +# General Public License as published by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU General Public License along with this program. If not, see +# . +# +# Author: Russel Winder + +Import ( 'environment' , 'lib' ) + +e = environment.Clone ( ) +e.Append ( LIBS = lib ) +e.Append ( CPPPATH = [ 'include' , '#libs/c/include' , '#libs/c/include/arch/' + e['ARCH'] ] ) + + +result = e.StaticLibrary ( 'elf' , Glob ( 'src/*.c' ) ) + +Return ( 'result' )