blob: 1f4e6b1e3ae8fd11e63f45651c1939ce664a5ecc [file] [log] [blame]
# -*- mode:tcl -*-
init lisp
# Make this `readline', `edit', or `none'
option READLINE readline
set lisp_libpath "$::root/lib/lisp"
if {$options(READLINE) == "none"} {
cflags -DNO_READLINE
} else {
cflags -L/usr/lib/i386-linux-gnu -l$options(READLINE)
}
presets 32 debug warn nasm
cflags -Ivendor/luajit/dynasm -O0
asmflags -felf32
set lua [pwd]/vendor/luajit/src/host/minilua
rule $lua ${lua}.c {
log CC $::src
cc "$::src -o $::target -lm"
}
rule [pwd]/compiler.c "[pwd]/compiler.dasc $lua" {
log DYNASM $::first_src
shell "$::lua vendor/luajit/dynasm/dynasm.lua -o $::target $::first_src"
}
rule repl [pwd]/lisp {
log LISP repl
shell "LISP_LIBRARY_PATH=$::lisp_libpath ./lisp $::root/lib/lisp/repl/repl.lisp"
}
srcs main.c lisp.c compiler.c lib/std.c plat/linux.c istream.c gc.c \
call_list.s error.c
type executable