29 lines
365 B
Makefile
29 lines
365 B
Makefile
all: test
|
|
|
|
CC = gcc
|
|
CFLAGS = -Wall -Wextra
|
|
|
|
OBJS = \
|
|
src/builtins.c.o \
|
|
src/ctype.c.o \
|
|
src/enums.c.o \
|
|
src/lexer.c.o \
|
|
src/main.c.o \
|
|
src/object.c.o \
|
|
src/parser.c.o \
|
|
src/tokens.c.o
|
|
|
|
run: lisp
|
|
./lisp
|
|
|
|
test: lisp
|
|
./lisp --test
|
|
|
|
clean:
|
|
rm -f lisp $(OBJS)
|
|
|
|
lisp: $(OBJS)
|
|
$(CC) -o $@ $^ $(CFLAGS)
|
|
|
|
%.c.o: %.c
|
|
$(CC) -c $< -o $@ $(CFLAGS)
|