2008-06-30 21:54:22 -04:00
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
NAME = flisp
|
|
|
|
SRCS = $(NAME).c builtins.c equal.c
|
|
|
|
OBJS = $(SRCS:%.c=%.o)
|
|
|
|
DOBJS = $(SRCS:%.c=%.do)
|
|
|
|
EXENAME = $(NAME)
|
2008-06-30 21:58:16 -04:00
|
|
|
LLTDIR = ../llt
|
|
|
|
LLT = $(LLTDIR)/libllt.a
|
2008-06-30 21:54:22 -04:00
|
|
|
|
2008-06-30 21:58:16 -04:00
|
|
|
FLAGS = -Wall -Wextra -Wno-strict-aliasing -I$(LLTDIR) $(CFLAGS)
|
2008-06-30 21:54:22 -04:00
|
|
|
LIBS = $(LLT) -lm
|
|
|
|
|
|
|
|
DEBUGFLAGS = -g -DDEBUG $(FLAGS)
|
|
|
|
SHIPFLAGS = -O3 -DNDEBUG -fomit-frame-pointer $(FLAGS)
|
|
|
|
|
|
|
|
default: release test
|
|
|
|
|
|
|
|
test:
|
|
|
|
./flisp unittest.lsp
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(SHIPFLAGS) -c $< -o $@
|
|
|
|
%.do: %.c
|
|
|
|
$(CC) $(DEBUGFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
flisp.o: flisp.c cvalues.c flisp.h print.c read.c
|
|
|
|
flisp.do: flisp.c cvalues.c flisp.h print.c read.c
|
|
|
|
|
|
|
|
$(LLT):
|
2008-06-30 21:58:16 -04:00
|
|
|
cd $(LLTDIR) && make
|
2008-06-30 21:54:22 -04:00
|
|
|
|
|
|
|
debug: $(DOBJS) $(LIBS)
|
|
|
|
$(CC) $(DEBUGFLAGS) $(DOBJS) -o $(EXENAME) $(LIBS)
|
2008-08-04 21:43:12 -04:00
|
|
|
make test
|
2008-06-30 21:54:22 -04:00
|
|
|
|
|
|
|
release: $(OBJS) $(LIBS)
|
|
|
|
$(CC) $(SHIPFLAGS) $(OBJS) -o $(EXENAME) $(LIBS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
rm -f *.do
|
|
|
|
rm -f $(EXENAME)
|