1
0
Fork 0
lesson-lisp/Makefile
2023-05-05 18:15:43 +04:00

34 lines
617 B
Makefile

all: test
CC = gcc
CFLAGS = -Wall -Wextra
OBJS = \
src/builtins.c.o \
src/ctype.c.o \
src/eval.c.o \
src/lexer.c.o \
src/object.c.o \
src/parser.c.o \
src/tokens.c.o
MAIN_OBJS = $(OBJS) src/main.c.o
TEST_OBJS = $(OBJS) src/main-test.c.o
repl: arcane-scheme-lisp
./arcane-scheme-lisp
test: arcane-scheme-lisp-test
./arcane-scheme-lisp-test
clean:
rm -f arcane-scheme-lisp arcane-scheme-lisp-test $(MAIN_OBJS) $(TEST_OBJS)
arcane-scheme-lisp: $(MAIN_OBJS)
$(CC) -o $@ $^ $(CFLAGS)
arcane-scheme-lisp-test: $(TEST_OBJS)
$(CC) -o $@ $^ $(CFLAGS)
%.c.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)