all: test CAT = cat CC = gcc DIFF_Q = diff -q RM_F = rm -f CFLAGS = -Wall -Wextra OBJS = \ src/builtins.c.o \ src/ctype.c.o \ src/eval.c.o \ src/lexer.c.o \ src/main.c.o \ src/object.c.o \ src/parser.c.o \ src/syntax.c.o \ src/tokens.c.o LIBS = \ -r lib/lists.scm \ -r lib/logic.scm \ -r lib/io.scm \ -r lib/type_predicates.scm repl: arcana-lisp ./arcana-lisp $(LIBS) test: arcana-lisp $(CAT) tests/arcana/builtin.scm | ./arcana-lisp $(LIBS) $(CAT) tests/arcana/tokenize.scm | ./arcana-lisp $(LIBS) $(CAT) tests/arcana/typeof.scm | ./arcana-lisp $(LIBS) $(CAT) tests/arcana/parse.scm | ./arcana-lisp $(LIBS) $(CAT) tests/arithm_ops.scm | ./arcana-lisp $(LIBS) $(CAT) tests/basic_data_structs.scm | ./arcana-lisp $(LIBS) $(CAT) tests/equiv.scm | ./arcana-lisp $(LIBS) $(CAT) tests/lists.scm | ./arcana-lisp $(LIBS) $(CAT) tests/logic_ops.scm | ./arcana-lisp $(LIBS) $(CAT) tests/syntax.scm | ./arcana-lisp $(LIBS) $(CAT) tests/type_conv.scm | ./arcana-lisp $(LIBS) $(CAT) tests/type_preds.scm | ./arcana-lisp $(LIBS) clean: $(RM_F) arcana-lisp $(OBJS) arcana-lisp: $(OBJS) $(CC) -o $@ $^ $(CFLAGS) %.c.o: %.c $(CC) -c $< -o $@ $(CFLAGS) tests/%.out: tests/%.scm arcana-lisp $(CAT) $< | ./arcana-lisp > $@