swissChili | 0fc3f26 | 2021-08-09 22:05:17 -0700 | [diff] [blame^] | 1 | # -*- mode:tcl -*- |
| 2 | |
| 3 | source "../../share/jmk/jmk.tcl" |
| 4 | |
| 5 | init lisp |
| 6 | |
| 7 | presets 32 debug warn nasm |
| 8 | cflags -Ivendor/luajit/dynasm -O0 |
| 9 | |
| 10 | option NO_READLINE 0 |
| 11 | |
| 12 | type executable |
| 13 | |
| 14 | if {$options(NO_READLINE) == 0} { |
| 15 | cflags -lreadline |
| 16 | } else { |
| 17 | cflags -DNO_READLINE |
| 18 | } |
| 19 | |
| 20 | set lua vendor/luajit/src/host/minilua |
| 21 | |
| 22 | rule $lua ${lua}.c { |
| 23 | log CC $source |
| 24 | cc $source -o $target -lm |
| 25 | } |
| 26 | |
| 27 | rule compiler.c "compiler.dasc $lua" { |
| 28 | log DYNASM $first_source |
| 29 | shell $::lua vendor/luajit/dynasm/dynasm.lua -o $target $first_source |
| 30 | } |
| 31 | |
| 32 | sources main.c lisp.c compiler.c lib/std.c plat/linux.c istream.c gc.c \ |
| 33 | call_list.s error.c |