diff options
author | Alex Auvolat <alex@adnab.me> | 2016-07-30 23:17:12 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-07-30 23:17:12 +0200 |
commit | f58f65c30de315d4419f69a92a708cbed797ff37 (patch) | |
tree | efaaa82089523dc0f7a3b9a6ab4c963550f9b241 /src/sysbin/bam.lua | |
parent | fa5327d4cc5e47656326b8c0c55d23cd71b04462 (diff) | |
download | kogata-f58f65c30de315d4419f69a92a708cbed797ff37.tar.gz kogata-f58f65c30de315d4419f69a92a708cbed797ff37.zip |
Release mode (enables some optimizations) ; fix tests.
Diffstat (limited to 'src/sysbin/bam.lua')
-rw-r--r-- | src/sysbin/bam.lua | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/sysbin/bam.lua b/src/sysbin/bam.lua index 8628bf1..9e13a8a 100644 --- a/src/sysbin/bam.lua +++ b/src/sysbin/bam.lua @@ -1,23 +1,24 @@ -local function sysbin_settings(name) - local s = TableDeepCopy(user_settings) - s.link.flags:Add("-T src/lib/linker.ld", - "-Xlinker -Map=build/sysbin/" .. name .. ".map") - return s -end +return function(s, lib) + local function sysbin_settings(name) + local s = TableDeepCopy(s.user_settings) + s.link.flags:Add("-T src/lib/linker.ld") + return s + end -local function sysbin_exe(name, deps) - local s = sysbin_settings(name) + local function sysbin_exe(name, deps) + local s = sysbin_settings(name) - local src = Collect('src/sysbin/' .. name .. '/*.c') - local obj = Compile(s, src) + local src = Collect('src/sysbin/' .. name .. '/*.c') + local obj = Compile(s, src) - return Link(s, 'sysbin/' .. name .. ".bin", {obj, deps}) -end + return Link(s, 'sysbin/' .. name .. ".bin", {obj, deps}) + end -sysbin = { - sysbin_exe('init', {libkogata}), - sysbin_exe('giosrv', {libkogata}), - sysbin_exe('login', {libkogata}), - sysbin_exe('terminal', {libkogata}), - sysbin_exe('shell', {libkogata}), -} + return { + sysbin_exe('init', {lib.libkogata}), + sysbin_exe('giosrv', {lib.libkogata}), + sysbin_exe('login', {lib.libkogata}), + sysbin_exe('terminal', {lib.libkogata}), + sysbin_exe('shell', {lib.libkogata}), + } +end |