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 /res | |
parent | 27a6934ea3073c3eaf782cc7615ce4ed0dbf4a18 (diff) | |
download | kogata-360da84db0d7165c84d160b518f39cd16006c758.tar.gz kogata-360da84db0d7165c84d160b518f39cd16006c758.zip |
Migrate to BAM build tool
Diffstat (limited to 'res')
-rw-r--r-- | res/fonts/bam.lua | 19 | ||||
-rw-r--r-- | res/keymaps/bam.lua | 12 |
2 files changed, 31 insertions, 0 deletions
diff --git a/res/fonts/bam.lua b/res/fonts/bam.lua new file mode 100644 index 0000000..1f99169 --- /dev/null +++ b/res/fonts/bam.lua @@ -0,0 +1,19 @@ +fonts = {} + +for _, file in pairs(Collect('res/fonts/*.s')) do + local out = PathJoin('build', PathBase(file) .. '.bf') + AddJob(out, "nasm font " .. out, "nasm -o " .. out .. " " .. file) + AddDependency(out, file) + table.insert(fonts, out) +end + +for _, file in pairs(Collect('res/fonts/*.c')) do + local obj = Compile(host_settings, file) + local tgt = PathJoin('build', PathBase(file) .. '_tmp') + local bin = Link(host_settings, tgt, obj) + + local out = PathJoin('build', PathBase(file) .. '.bf') + AddJob(out, "call font " .. bin, "./" .. bin .. " > " .. out) + AddDependency(out, bin) + table.insert(fonts, out) +end diff --git a/res/keymaps/bam.lua b/res/keymaps/bam.lua new file mode 100644 index 0000000..f078dd0 --- /dev/null +++ b/res/keymaps/bam.lua @@ -0,0 +1,12 @@ +keymaps = {} + +for _, file in pairs(Collect('res/keymaps/*.c')) do + local obj = Compile(host_settings, file) + local tgt = PathJoin('build', PathBase(file) .. '_tmp') + local bin = Link(host_settings, tgt, obj) + + local out = PathJoin('build', PathBase(file) .. '.km') + AddJob(out, "call font " .. bin, "./" .. bin .. " > " .. out) + AddDependency(out, bin) + table.insert(keymaps, out) +end |