aboutsummaryrefslogtreecommitdiff
path: root/src/lib/bam.lua
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2016-07-30 23:17:12 +0200
committerAlex Auvolat <alex@adnab.me>2016-07-30 23:17:12 +0200
commitf58f65c30de315d4419f69a92a708cbed797ff37 (patch)
treeefaaa82089523dc0f7a3b9a6ab4c963550f9b241 /src/lib/bam.lua
parentfa5327d4cc5e47656326b8c0c55d23cd71b04462 (diff)
downloadkogata-f58f65c30de315d4419f69a92a708cbed797ff37.tar.gz
kogata-f58f65c30de315d4419f69a92a708cbed797ff37.zip
Release mode (enables some optimizations) ; fix tests.
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