2011-04-20 16:59:27 +00:00
|
|
|
CFLAGS=-I../../include -DDEBUG=2 -DPSYC_COMPILE_LIBRARY -g -O0 -Wall
|
2011-04-16 15:30:03 +00:00
|
|
|
CC=cc -I../include
|
2011-02-18 13:03:45 +00:00
|
|
|
# CC=clang
|
2010-02-20 23:20:55 +00:00
|
|
|
|
2011-04-16 15:30:03 +00:00
|
|
|
S=parser.c match.c
|
|
|
|
O=parser.o match.o
|
|
|
|
|
2010-09-18 16:08:02 +00:00
|
|
|
default:
|
|
|
|
@/bin/echo -e "Usage:\n\tmake diet - compile with diet libc\n\tmake lib - compile with normal gnu libc"
|
|
|
|
|
|
|
|
diet:
|
2011-04-19 07:21:00 +00:00
|
|
|
diet ${CC} -static -c -Os $S ${CFLAGS}
|
2011-04-17 12:17:11 +00:00
|
|
|
diet ar rcs libpsyc.a $O
|
2010-02-20 23:20:55 +00:00
|
|
|
|
2011-04-16 15:30:03 +00:00
|
|
|
lib: $S
|
2011-04-19 07:21:00 +00:00
|
|
|
${CC} -static -c -g -O0 $S -lc ${CFLAGS}
|
2011-04-16 15:30:03 +00:00
|
|
|
ar rcs libpsyc.a $O
|
2011-04-16 11:49:47 +00:00
|
|
|
|
|
|
|
match: match.c
|
2011-04-20 16:59:27 +00:00
|
|
|
${CC} -o $@ -DDEBUG=4 -DCMDTOOL -DTEST $<
|
2011-04-16 11:49:47 +00:00
|
|
|
|
|
|
|
it: match
|
2011-04-19 20:52:08 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $O
|