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 \
|
|
|
|
src/lexer.c.o \
|
|
|
|
src/main.c.o \
|
|
|
|
src/object.c.o \
|
|
|
|
src/parser.c.o \
|
|
|
|
src/tokens.c.o
|
2023-05-03 18:05:11 -04:00
|
|
|
|
2023-05-05 04:42:35 -04:00
|
|
|
repl: lisp
|
2023-05-05 06:37:04 -04:00
|
|
|
./lisp
|
2023-05-05 04:42:35 -04:00
|
|
|
|
2023-05-04 08:27:39 -04:00
|
|
|
test: lisp
|
|
|
|
./lisp --test
|
|
|
|
|
2023-05-03 18:05:11 -04:00
|
|
|
clean:
|
|
|
|
rm -f lisp $(OBJS)
|
2023-05-03 14:42:26 -04:00
|
|
|
|
|
|
|
lisp: $(OBJS)
|
|
|
|
$(CC) -o $@ $^ $(CFLAGS)
|
|
|
|
|
|
|
|
%.c.o: %.c
|
|
|
|
$(CC) -c $< -o $@ $(CFLAGS)
|