2008-10-12 20:53:28 -04:00
|
|
|
CC=gcc
|
2010-06-13 16:47:17 -04:00
|
|
|
CFLAGS=-Wall -pedantic -g -DUNIX_HOST
|
2009-11-08 06:51:24 -05:00
|
|
|
LIBS=-lm
|
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:
|
|
|
|
rm -f $(TARGET) $(OBJS) *~
|
|
|
|
|
|
|
|
count:
|
2009-06-04 03:41:06 -04:00
|
|
|
cat picoc.h picoc.c table.c lex.c parse.c expression.c platform.c heap.c type.c variable.c | grep -v '^[ ]*/\*' | grep -v '^[ ]*$$' | wc
|
2008-10-12 20:53:28 -04:00
|
|
|
|
|
|
|
depend:
|
|
|
|
$(CC) -MM $(SRCS) >.depend
|
|
|
|
|
|
|
|
-include .depend
|