blob: 42a0e51eb33e6213103b51776456d20bb5dd7b51 [file] [log] [blame]
swissChili7a6f5eb2021-04-13 16:46:02 -07001init(lisp, lisp)
2
3preset(optimize)
4preset(32)
5preset(debug)
6preset(warn)
7
8archetype(c)
9
swissChilica107a02021-04-14 12:07:30 -070010CFLAGS += -Ivendor/luajit/dynasm
11
12OBJECTS = main.o \
13 lisp.o \
14 compiler.o
15
16LUA = vendor/luajit/src/host/minilua
17
18vendor/luajit/src/host/minilua: vendor/luajit/src/host/minilua.c
19 status_log(CC, $<)
20 @$(CC) $< -o $@ -lm
21
22compiler.c: compiler.dasc
23 status_log(DYNASM, $<)
24 @$(LUA) vendor/luajit/dynasm/dynasm.lua -o $@ $<
swissChili7a6f5eb2021-04-13 16:46:02 -070025
26type(executable)
27
28run: lisp
29 status_log(RUN, ./lisp)
swissChilibed80922021-04-13 21:58:05 -070030 @./lisp "$$(cat test.lisp)"
31
32format:
33 status_log(FORMAT, *)
swissChilica107a02021-04-14 12:07:30 -070034 @clang-format -i *.c *.h *.dasc
swissChili7a6f5eb2021-04-13 16:46:02 -070035
36finish