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

38 lines
742 B
Makefile
Raw Normal View History

2011-04-30 13:42:48 +00:00
OPT = -O2
DEBUG = 2
CFLAGS = -I../include -Wall -std=c99 ${OPT}
2011-04-30 13:42:48 +00:00
DIET = diet
2010-02-20 23:20:55 +00:00
2011-05-09 07:06:52 +00:00
S = packet.c parse.c match.c render.c memmem.c itoa.c variable.c text.c
O = packet.o parse.o match.o render.o memmem.o itoa.o variable.o text.o
2011-05-10 14:54:40 +00:00
P = match itoa
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:
2011-05-10 14:54:40 +00:00
rm -f $O $P
2011-04-30 14:05:48 +00:00
help:
@/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc"