47 lines
1.1 KiB
Makefile
47 lines
1.1 KiB
Makefile
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
|
|
|
|
repl: arcana-lisp
|
|
./arcana-lisp
|
|
|
|
test: arcana-lisp
|
|
$(CAT) tests/arcana/builtin.scm | ./arcana-lisp
|
|
$(CAT) tests/arcana/tokenize.scm | ./arcana-lisp
|
|
$(CAT) tests/arcana/typeof.scm | ./arcana-lisp
|
|
$(CAT) tests/arcana/parse.scm | ./arcana-lisp
|
|
$(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
|
|
|
|
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 > $@
|