swissChili | 7a6f5eb | 2021-04-13 16:46:02 -0700 | [diff] [blame] | 1 | init(lisp, lisp) |
| 2 | |
| 3 | preset(optimize) |
| 4 | preset(32) |
| 5 | preset(debug) |
| 6 | preset(warn) |
| 7 | |
| 8 | archetype(c) |
| 9 | |
swissChili | ca107a0 | 2021-04-14 12:07:30 -0700 | [diff] [blame^] | 10 | CFLAGS += -Ivendor/luajit/dynasm |
| 11 | |
| 12 | OBJECTS = main.o \ |
| 13 | lisp.o \ |
| 14 | compiler.o |
| 15 | |
| 16 | LUA = vendor/luajit/src/host/minilua |
| 17 | |
| 18 | vendor/luajit/src/host/minilua: vendor/luajit/src/host/minilua.c |
| 19 | status_log(CC, $<) |
| 20 | @$(CC) $< -o $@ -lm |
| 21 | |
| 22 | compiler.c: compiler.dasc |
| 23 | status_log(DYNASM, $<) |
| 24 | @$(LUA) vendor/luajit/dynasm/dynasm.lua -o $@ $< |
swissChili | 7a6f5eb | 2021-04-13 16:46:02 -0700 | [diff] [blame] | 25 | |
| 26 | type(executable) |
| 27 | |
| 28 | run: lisp |
| 29 | status_log(RUN, ./lisp) |
swissChili | bed8092 | 2021-04-13 21:58:05 -0700 | [diff] [blame] | 30 | @./lisp "$$(cat test.lisp)" |
| 31 | |
| 32 | format: |
| 33 | status_log(FORMAT, *) |
swissChili | ca107a0 | 2021-04-14 12:07:30 -0700 | [diff] [blame^] | 34 | @clang-format -i *.c *.h *.dasc |
swissChili | 7a6f5eb | 2021-04-13 16:46:02 -0700 | [diff] [blame] | 35 | |
| 36 | finish |