2008-10-12 20:53:28 -04:00
|
|
|
CC=gcc
|
2011-02-14 23:00:53 -05:00
|
|
|
CFLAGS=-Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\"
|
2010-07-05 15:53:34 -04:00
|
|
|
LIBS=-lm -lreadline
|
2008-10-12 20:53:28 -04:00
|
|
|
|
|
|
|
TARGET = picoc
|
2010-06-05 15:00:46 -04:00
|
|
|
SRCS = picoc.c table.c lex.c parse.c expression.c heap.c type.c \
|
2010-06-13 05:17:42 -04:00
|
|
|
variable.c clibrary.c platform.c include.c \
|
|
|
|
platform/platform_unix.c platform/library_unix.c \
|
2010-06-23 16:36:40 -04:00
|
|
|
cstdlib/stdio.c cstdlib/math.c cstdlib/string.c cstdlib/stdlib.c \
|
2010-07-03 17:07:47 -04:00
|
|
|
cstdlib/time.c cstdlib/errno.c cstdlib/ctype.c cstdlib/stdbool.c \
|
|
|
|
cstdlib/unistd.c
|
2008-10-12 20:53:28 -04:00
|
|
|
OBJS := $(SRCS:%.c=%.o)
|
|
|
|
|
2009-02-28 16:29:51 -05:00
|
|
|
all: depend $(TARGET)
|
2008-10-12 20:53:28 -04:00
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
2008-12-26 21:25:49 -05:00
|
|
|
$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
|
2008-10-12 20:53:28 -04:00
|
|
|
|
2009-03-12 06:49:57 -04:00
|
|
|
test: all
|
2009-02-15 01:16:54 -05:00
|
|
|
(cd tests; make test)
|
2009-01-03 23:08:49 -05:00
|
|
|
|
2008-10-12 20:53:28 -04:00
|
|
|
clean:
|
2011-02-15 16:47:54 -05:00
|
|
|
rm -f $(TARGET) $(OBJS) *~
|
2008-10-12 20:53:28 -04:00
|
|
|
|
|
|
|
count:
|
2010-07-03 17:17:51 -04:00
|
|
|
@echo "Core:"
|
2011-02-17 22:30:34 -05:00
|
|
|
@cat picoc.h interpreter.h picoc.c table.c lex.c parse.c expression.c platform.c heap.c type.c variable.c include.c | grep -v '^[ ]*/\*' | grep -v '^[ ]*$$' | wc
|
2010-07-03 17:17:51 -04:00
|
|
|
@echo ""
|
|
|
|
@echo "Everything:"
|
|
|
|
@cat $(SRCS) *.h */*.h | wc
|
2008-10-12 20:53:28 -04:00
|
|
|
|
|
|
|
depend:
|
|
|
|
$(CC) -MM $(SRCS) >.depend
|
|
|
|
|
2011-02-15 00:01:55 -05:00
|
|
|
.PHONY: clibrary.c
|
|
|
|
|
2008-10-12 20:53:28 -04:00
|
|
|
-include .depend
|