2008-10-12 20:53:28 -04:00
|
|
|
CC=gcc
|
2009-05-04 08:02:16 -04:00
|
|
|
CFLAGS=-Wall -g -DUNIX_HOST
|
2008-12-26 21:25:49 -05:00
|
|
|
LIBS=-lm
|
2008-10-12 20:53:28 -04:00
|
|
|
|
|
|
|
TARGET = picoc
|
2009-03-15 03:07:21 -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
|
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-03-11 06:23:40 -04:00
|
|
|
cat picoc.h picoc.c table.c lex.c parse.c expression.c heap.c type.c variable.c clibrary.c | grep -v '^[ ]*/\*' | grep -v '^[ ]*$$' | wc
|
2008-10-12 20:53:28 -04:00
|
|
|
|
|
|
|
depend:
|
|
|
|
$(CC) -MM $(SRCS) >.depend
|
|
|
|
|
|
|
|
-include .depend
|