diff options
author | Alex Auvolat <alex@adnab.me> | 2016-07-13 22:31:46 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-07-13 22:31:46 +0200 |
commit | 360da84db0d7165c84d160b518f39cd16006c758 (patch) | |
tree | a6fea5da753ec4ac5a37237cefda52801f9647ac /src/sysbin/bam.lua | |
parent | 27a6934ea3073c3eaf782cc7615ce4ed0dbf4a18 (diff) | |
download | kogata-360da84db0d7165c84d160b518f39cd16006c758.tar.gz kogata-360da84db0d7165c84d160b518f39cd16006c758.zip |
Migrate to BAM build tool
Diffstat (limited to 'src/sysbin/bam.lua')
-rw-r--r-- | src/sysbin/bam.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/sysbin/bam.lua b/src/sysbin/bam.lua new file mode 100644 index 0000000..819bc43 --- /dev/null +++ b/src/sysbin/bam.lua @@ -0,0 +1,23 @@ +local function sysbin_settings(name) + local s = TableDeepCopy(user_settings) + s.link.flags:Add("-T src/sysbin/linker.ld", + "-Xlinker -Map=build/" .. name .. ".map") + return s +end + +local function sysbin_exe(name) + local s = sysbin_settings(name) + + local src = Collect('src/sysbin/' .. name .. '/*.c') + local obj = Compile(s, src) + + return Link(s, name .. ".bin", {obj, libkogata}) +end + +sysbin = { + sysbin_exe('init'), + sysbin_exe('giosrv'), + sysbin_exe('login'), + sysbin_exe('terminal'), + sysbin_exe('shell'), +} |