2023-05-04 08:27:39 -04:00
|
|
|
all: test
|
2023-05-03 14:42:26 -04:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
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 \
|
|
|
|
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-05 07:35:34 -04:00
|
|
|
MAIN_OBJS = $(OBJS) src/main.c.o
|
|
|
|
TEST_OBJS = $(OBJS) src/main-test.c.o
|
|
|
|
|
2023-05-05 10:15:43 -04:00
|
|
|
repl: arcane-scheme-lisp
|
|
|
|
./arcane-scheme-lisp
|
2023-05-05 04:42:35 -04:00
|
|
|
|
2023-05-06 06:54:37 -04:00
|
|
|
test: arcane-scheme-lisp arcane-scheme-lisp-test
|
2023-05-05 10:15:43 -04:00
|
|
|
./arcane-scheme-lisp-test
|
2023-05-04 08:27:39 -04:00
|
|
|
|
2023-05-03 18:05:11 -04:00
|
|
|
clean:
|
2023-05-05 10:15:43 -04:00
|
|
|
rm -f arcane-scheme-lisp arcane-scheme-lisp-test $(MAIN_OBJS) $(TEST_OBJS)
|
2023-05-05 07:35:34 -04:00
|
|
|
|
2023-05-05 10:15:43 -04:00
|
|
|
arcane-scheme-lisp: $(MAIN_OBJS)
|
2023-05-05 07:35:34 -04:00
|
|
|
$(CC) -o $@ $^ $(CFLAGS)
|
2023-05-03 14:42:26 -04:00
|
|
|
|
2023-05-05 10:15:43 -04:00
|
|
|
arcane-scheme-lisp-test: $(TEST_OBJS)
|
2023-05-03 14:42:26 -04:00
|
|
|
$(CC) -o $@ $^ $(CFLAGS)
|
|
|
|
|
|
|
|
%.c.o: %.c
|
|
|
|
$(CC) -c $< -o $@ $(CFLAGS)
|