summaryrefslogtreecommitdiff
path: root/src/lisp/Makefile
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-11-01 21:14:45 -0700
committerKeith Packard <keithp@keithp.com>2017-02-20 11:16:49 -0800
commitd2408e72d1e0d3459918601712b09860ab17e200 (patch)
tree5405e41249373e4d174e61e157ee30d00f145c8d /src/lisp/Makefile
parente2f4d25cd6f6f3787d4ee99264732d5b2ce23d4c (diff)
altos/lisp: Change lisp objects to use ao_poly everywhere. Add const
This makes all lisp objects use 16-bit ints for references so we can hold more stuff in small amounts of memory. Also adds a separate constant pool of lisp objects for builtins, initial atoms and constant lisp code. Now builds (and runs!) on the nucleo-32 boards. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/Makefile')
-rw-r--r--src/lisp/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lisp/Makefile b/src/lisp/Makefile
new file mode 100644
index 00000000..e8c3c02c
--- /dev/null
+++ b/src/lisp/Makefile
@@ -0,0 +1,32 @@
+all: ao_lisp_const.h
+
+clean:
+ rm -f ao_lisp_const.h $(OBJS) ao_lisp_make_const
+
+ao_lisp_const.h: ao_lisp_const.lisp ao_lisp_make_const
+ ./ao_lisp_make_const < ao_lisp_const.lisp > $@
+
+SRCS=\
+ ao_lisp_make_const.c\
+ ao_lisp_mem.c \
+ ao_lisp_cons.c \
+ ao_lisp_string.c \
+ ao_lisp_atom.c \
+ ao_lisp_int.c \
+ ao_lisp_poly.c \
+ ao_lisp_prim.c \
+ ao_lisp_builtin.c \
+ ao_lisp_read.c
+
+OBJS=$(SRCS:.c=.o)
+
+CFLAGS=-DAO_LISP_MAKE_CONST -O0 -g
+
+HDRS=\
+ ao_lisp.h \
+ ao_lisp_read.h
+
+ao_lisp_make_const: $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS)
+
+$(OBJS): $(HDRS)