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 TEST_OUTS = \ tests/arithm_ops.out \ tests/basic_data_structs.out \ tests/hello.out \ tests/arcana.out \ tests/equiv.out \ tests/logic_ops.out \ tests/syntax.out \ tests/type_conv.out \ tests/type_preds.out repl: arcana-lisp ./arcana-lisp test: $(TEST_OUTS) $(DIFF_Q) tests/arithm_ops.txt tests/arithm_ops.out $(DIFF_Q) tests/basic_data_structs.txt tests/basic_data_structs.out $(DIFF_Q) tests/hello.txt tests/hello.out $(DIFF_Q) tests/arcana.txt tests/arcana.out $(DIFF_Q) tests/equiv.txt tests/equiv.out $(DIFF_Q) tests/logic_ops.txt tests/logic_ops.out $(DIFF_Q) tests/syntax.txt tests/syntax.out $(DIFF_Q) tests/type_conv.txt tests/type_conv.out $(DIFF_Q) tests/type_preds.txt tests/type_preds.out clean: $(RM_F) arcana-lisp $(OBJS) $(TEST_OUTS) arcana-lisp: $(OBJS) $(CC) -o $@ $^ $(CFLAGS) %.c.o: %.c $(CC) -c $< -o $@ $(CFLAGS) tests/%.out: tests/%.scm arcana-lisp $(CAT) $< | ./arcana-lisp > $@