aboutsummaryrefslogtreecommitdiff
path: root/src/lib/bam.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/bam.lua')
-rw-r--r--src/lib/bam.lua24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/lib/bam.lua b/src/lib/bam.lua
index 44edad2..b7bee20 100644
--- a/src/lib/bam.lua
+++ b/src/lib/bam.lua
@@ -1,11 +1,15 @@
-local function lib(name)
- local source = {Collect('src/lib/' .. name .. '/*.c'),
- Collect('src/lib/' .. name .. '/*.s')}
- return Compile(user_settings, source)
-end
-
-libc = {lib('libc'), common_libc, common_libkogata}
+return function(s, common)
+ local function lib(name)
+ local source = {Collect('src/lib/' .. name .. '/*.c'),
+ Collect('src/lib/' .. name .. '/*.s')}
+ return Compile(s.user_settings, source)
+ end
+
+ local libc = {lib('libc'), common.libc, common.libkogata}
-libkogata = {lib('libkogata'), libc}
-
-liblua = {lib('lua'), libc}
+ return {
+ libc = libc,
+ libkogata = {lib('libkogata'), libc},
+ liblua = {lib('lua'), libc}
+ }
+end