2008-10-12 20:53:28 -04:00
|
|
|
CC=gcc
|
2009-11-06 17:16:12 -05: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 \
|
|
|
|
variable.c clibrary.c library_unix.c platform.c platform_unix.c \
|
|
|
|
math_library.c include.c library_stdio.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
|