aboutsummaryrefslogtreecommitdiff
path: root/res/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'res/fonts')
-rw-r--r--res/fonts/bam.lua19
1 files changed, 19 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