2011-04-30 13:42:48 +00:00
|
|
|
OPT = -O2
|
|
|
|
DEBUG = 2
|
|
|
|
CFLAGS = -I../include -Wall ${OPT}
|
|
|
|
DIET = diet
|
|
|
|
WRAPPER =
|
2010-02-20 23:20:55 +00:00
|
|
|
|
2011-04-30 13:42:48 +00:00
|
|
|
S = packet.c misc.c parser.c match.c render.c memmem.c itoa.c variable.c
|
|
|
|
O = packet.o misc.o parser.o match.o render.o memmem.o itoa.o variable.o
|
2011-04-30 10:56:07 +00:00
|
|
|
|
2011-04-30 13:42:48 +00:00
|
|
|
all: lib
|
2011-04-16 15:30:03 +00:00
|
|
|
|
2011-04-30 13:42:48 +00:00
|
|
|
help:
|
2010-09-18 16:08:02 +00:00
|
|
|
@/bin/echo -e "Usage:\n\tmake diet - compile with diet libc\n\tmake lib - compile with normal gnu libc"
|
|
|
|
|
2011-04-30 13:42:48 +00:00
|
|
|
debug: CFLAGS += -DDEBUG=${DEBUG} -g
|
|
|
|
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
|
|
|
|
debug: lib
|
2010-02-20 23:20:55 +00:00
|
|
|
|
2011-04-30 13:42:48 +00:00
|
|
|
diet: WRAPPER = ${DIET}
|
|
|
|
diet: lib
|
|
|
|
|
|
|
|
lib: CC := ${WRAPPER} ${CC}
|
|
|
|
lib: $O
|
|
|
|
@mkdir -p ../lib
|
|
|
|
${WRAPPER} ar rcs ../lib/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
|
|
|
|
2011-04-25 14:11:47 +00:00
|
|
|
itoa: itoa.c
|
|
|
|
${CC} -o $@ -DDEBUG=4 -DCMDTOOL -DTEST -O0 $<
|
|
|
|
|
2011-04-16 11:49:47 +00:00
|
|
|
it: match
|
2011-04-19 20:52:08 +00:00
|
|
|
|
|
|
|
clean:
|
2011-04-30 10:56:07 +00:00
|
|
|
rm -f $O ../lib/libpsyc.a
|