2023-05-04 08:27:39 -04:00
|
|
|
all: test
|
2023-05-03 14:42:26 -04:00
|
|
|
|
2023-05-06 08:30:59 -04:00
|
|
|
CAT = cat
|
2023-05-03 14:42:26 -04:00
|
|
|
CC = gcc
|
2023-05-06 08:30:59 -04:00
|
|
|
DIFF_Q = diff -q
|
|
|
|
RM_F = rm -f
|
|
|
|
|
2023-05-03 14:42:26 -04:00
|
|
|
CFLAGS = -Wall -Wextra
|
|
|
|
|
2023-05-04 07:18:16 -04:00
|
|
|
OBJS = \
|
2023-05-04 15:34:05 -04:00
|
|
|
src/builtins.c.o \
|
|
|
|
src/ctype.c.o \
|
2023-05-05 07:35:34 -04:00
|
|
|
src/eval.c.o \
|
2023-05-04 15:34:05 -04:00
|
|
|
src/lexer.c.o \
|
2023-05-06 14:40:30 -04:00
|
|
|
src/main.c.o \
|
2023-05-04 15:34:05 -04:00
|
|
|
src/object.c.o \
|
|
|
|
src/parser.c.o \
|
2023-05-05 14:26:07 -04:00
|
|
|
src/syntax.c.o \
|
2023-05-04 15:34:05 -04:00
|
|
|
src/tokens.c.o
|
2023-05-03 18:05:11 -04:00
|
|
|
|
2023-05-06 14:31:07 -04:00
|
|
|
repl: arcana-lisp
|
|
|
|
./arcana-lisp
|
2023-05-05 04:42:35 -04:00
|
|
|
|
2023-05-06 15:13:35 -04:00
|
|
|
test: arcana-lisp
|
2023-05-07 08:06:16 -04:00
|
|
|
$(CAT) tests/arcana/builtin.scm | ./arcana-lisp
|
2023-05-07 07:16:53 -04:00
|
|
|
$(CAT) tests/arcana/tokenize.scm | ./arcana-lisp
|
2023-05-07 08:57:07 -04:00
|
|
|
$(CAT) tests/arcana/typeof.scm | ./arcana-lisp
|
2023-05-07 08:56:04 -04:00
|
|
|
$(CAT) tests/arcana/parse.scm | ./arcana-lisp
|
2023-05-06 15:13:35 -04:00
|
|
|
$(CAT) tests/arithm_ops.scm | ./arcana-lisp
|
|
|
|
$(CAT) tests/basic_data_structs.scm | ./arcana-lisp
|
|
|
|
$(CAT) tests/equiv.scm | ./arcana-lisp
|
|
|
|
$(CAT) tests/logic_ops.scm | ./arcana-lisp
|
|
|
|
$(CAT) tests/syntax.scm | ./arcana-lisp
|
|
|
|
$(CAT) tests/type_conv.scm | ./arcana-lisp
|
|
|
|
$(CAT) tests/type_preds.scm | ./arcana-lisp
|
2023-05-04 08:27:39 -04:00
|
|
|
|
2023-05-03 18:05:11 -04:00
|
|
|
clean:
|
2023-05-06 15:13:35 -04:00
|
|
|
$(RM_F) arcana-lisp $(OBJS)
|
2023-05-03 14:42:26 -04:00
|
|
|
|
2023-05-06 14:40:30 -04:00
|
|
|
arcana-lisp: $(OBJS)
|
2023-05-03 14:42:26 -04:00
|
|
|
$(CC) -o $@ $^ $(CFLAGS)
|
|
|
|
|
|
|
|
%.c.o: %.c
|
|
|
|
$(CC) -c $< -o $@ $(CFLAGS)
|
2023-05-06 12:58:11 -04:00
|
|
|
|
2023-05-06 14:31:07 -04:00
|
|
|
tests/%.out: tests/%.scm arcana-lisp
|
|
|
|
$(CAT) $< | ./arcana-lisp > $@
|