blob: 242708f90b881ebc8f90348d48187f39b8695380 [file] [log] [blame]
# -*- mode:tcl -*-
init lisp
presets 32 debug warn nasm
cflags -Ivendor/luajit/dynasm -O0
asmflags -felf32
# 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)
}
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"
}
rule valgrind [pwd]/lisp {
log VALGRIND "lisp test-gc.lisp"
shell "LISP_LIBRARY_PATH=$::lisp_libpath valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all ./lisp quicksort.lisp"
}
srcs main.c lisp.c compiler.c lib/std.c plat/linux.c istream.c gc.c \
call_list.s error.c lib/classes.c
type executable