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-16 15:30:03 +00:00
|
|
|
/opt/diet/bin/diet ${CC} -static -c -Os $S -DDEBUG
|
|
|
|
/opt/diet/bin/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-17 11:59:07 +00:00
|
|
|
${CC} -static -c -g -O0 $S -lc -DDEBUG -DPSYC_COMPILE_LIBRARY
|
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-16 15:30:03 +00:00
|
|
|
${CC} -o $@ -DDEBUG=2 -DCMDTOOL -DTEST $<
|
2011-04-16 11:49:47 +00:00
|
|
|
|
|
|
|
it: match
|