blob: 37fa78814b7706f6ac17d18331533246885dd883 [file] [log] [blame]
# -*- mode:makefile -*-
init(lisp, lisp)
option(PLAT, "`platform to build for: either linux or bluejay'", linux)
preset(optimize)
preset(32)
preset(debug)
preset(warn)
archetype(c, asm)
CFLAGS += -Ivendor/luajit/dynasm
OBJECTS = main.o \
lisp.o \
compiler.o \
lib/std.o \
plat/linux.o \
istream.o \
gc.o
LUA = vendor/luajit/src/host/minilua
vendor/luajit/src/host/minilua: vendor/luajit/src/host/minilua.c
status_log(CC, $<)
@$(CC) $< -o $@ -lm
compiler.c: compiler.dasc
status_log(DYNASM, $<)
@$(LUA) vendor/luajit/dynasm/dynasm.lua -o $@ $<
type(executable)
run: lisp
status_log(LISP, test.lisp)
@./lisp ./test.lisp
format:
status_log(FORMAT, *)
@clang-format -i *.c *.h *.dasc plat/* lib/*
finish