blob: 4d0825f120fdfd376e8bab0f07a705ad219b61d3 [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)
CFLAGS += -Ivendor/luajit/dynasm
OBJECTS = main.o \
lisp.o \
compiler.o \
lib/std.o \
plat/linux.o \
istream.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(RUN, ./lisp)
@./lisp ./test.lisp
format:
status_log(FORMAT, *)
@clang-format -i *.c *.h *.dasc plat/* lib/*
finish