aboutsummaryrefslogtreecommitdiff
path: root/src/bin/bam.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/bam.lua')
-rw-r--r--src/bin/bam.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bin/bam.lua b/src/bin/bam.lua
new file mode 100644
index 0000000..56b21fb
--- /dev/null
+++ b/src/bin/bam.lua
@@ -0,0 +1,20 @@
+local function bin_settings(name)
+ local s = TableDeepCopy(user_settings)
+ s.link.flags:Add("-T src/bin/linker.ld",
+ "-Xlinker -Map=build/bin/" .. name .. ".map")
+ return s
+end
+
+local function bin_exe(name, moredeps)
+ local s = sysbin_settings(name)
+
+ local src = Collect('src/bin/' .. name .. '/*.c')
+ local obj = Compile(s, src)
+
+ return Link(s, 'bin/' .. name .. ".bin", {obj, libkogata, moredeps})
+end
+
+bin = {
+ -- bin_exe('lua', {liblua, liblualib}),
+ -- bin_exe('luac', {liblua, liblualib}),
+}