picoc/Makefile
zik.saleeba 0fc32f5bc7 A bit of a reorganisation to make adding new platforms and
C standard library modules neater.


git-svn-id: http://picoc.googlecode.com/svn/trunk@427 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-13 09:17:42 +00:00

30 lines
645 B
Makefile

CC=gcc
CFLAGS=-Wall -pedantic -g -DUNIX_HOST
LIBS=-lm
TARGET = picoc
SRCS = picoc.c table.c lex.c parse.c expression.c heap.c type.c \
variable.c clibrary.c platform.c include.c \
platform/platform_unix.c platform/library_unix.c \
cstdlib/library_stdio.c
OBJS := $(SRCS:%.c=%.o)
all: depend $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
test: all
(cd tests; make test)
clean:
rm -f $(TARGET) $(OBJS) *~
count:
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
depend:
$(CC) -MM $(SRCS) >.depend
-include .depend