2008-06-30 21:54:22 -04:00
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
NAME = flisp
|
2009-07-10 00:17:39 -04:00
|
|
|
SRCS = $(NAME).c builtins.c string.c equalhash.c table.c iostream.c
|
2008-06-30 21:54:22 -04:00
|
|
|
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
|
|
|
|
2009-08-28 20:54:51 -04:00
|
|
|
FLAGS = -falign-functions -Wall -Wno-strict-aliasing -I$(LLTDIR) $(CFLAGS) -DUSE_COMPUTED_GOTO
|
2009-08-23 21:11:36 -04:00
|
|
|
LIBFILES = $(LLT)
|
|
|
|
LIBS = $(LIBFILES) -lm
|
2008-06-30 21:54:22 -04:00
|
|
|
|
|
|
|
DEBUGFLAGS = -g -DDEBUG $(FLAGS)
|
2009-07-29 00:20:28 -04:00
|
|
|
SHIPFLAGS = -O2 -DNDEBUG $(FLAGS)
|
2008-06-30 21:54:22 -04:00
|
|
|
|
|
|
|
default: release test
|
|
|
|
|
|
|
|
test:
|
|
|
|
./flisp unittest.lsp
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(SHIPFLAGS) -c $< -o $@
|
|
|
|
%.do: %.c
|
|
|
|
$(CC) $(DEBUGFLAGS) -c $< -o $@
|
|
|
|
|
2008-12-10 23:04:17 -05:00
|
|
|
flisp.o: flisp.c cvalues.c types.c flisp.h print.c read.c
|
|
|
|
flisp.do: flisp.c cvalues.c types.c flisp.h print.c read.c
|
2008-06-30 21:54:22 -04:00
|
|
|
|
|
|
|
$(LLT):
|
2008-06-30 21:58:16 -04:00
|
|
|
cd $(LLTDIR) && make
|
2008-06-30 21:54:22 -04:00
|
|
|
|
2009-08-23 21:11:36 -04:00
|
|
|
debug: $(DOBJS) $(LIBFILES)
|
2008-06-30 21:54:22 -04:00
|
|
|
$(CC) $(DEBUGFLAGS) $(DOBJS) -o $(EXENAME) $(LIBS)
|
2008-08-04 21:43:12 -04:00
|
|
|
make test
|
2008-06-30 21:54:22 -04:00
|
|
|
|
2009-08-23 21:11:36 -04:00
|
|
|
release: $(OBJS) $(LIBFILES)
|
2008-06-30 21:54:22 -04:00
|
|
|
$(CC) $(SHIPFLAGS) $(OBJS) -o $(EXENAME) $(LIBS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
rm -f *.do
|
|
|
|
rm -f $(EXENAME)
|