1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00
libpsyc/src/Makefile

37 lines
731 B
Makefile
Raw Normal View History

2011-04-30 13:42:48 +00:00
OPT = -O2
DEBUG = 2
CFLAGS = -I../include -Wall ${OPT}
DIET = diet
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 14:05:48 +00:00
all: CC := ${WRAPPER} ${CC}
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
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}
2011-04-30 14:05:48 +00:00
diet: CC := ${WRAPPER} ${CC}
2011-04-30 13:42:48 +00:00
diet: lib
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
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:
rm -f $O ../lib/libpsyc.a
2011-04-30 14:05:48 +00:00
help:
@/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc"