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

Makefile fixes

This commit is contained in:
tg(x) 2011-04-30 16:05:48 +02:00
parent c0e4edadb3
commit 5496700af0
2 changed files with 10 additions and 10 deletions

View file

@ -2,11 +2,8 @@
.PHONY: test
.PHONY: lib
default:
@/bin/echo -e "Usage:\n\tmake diet - compile with diet libc\n\tmake glibc - compile with normal gnu libc\n\tmake test\n\tmake doc"
lib:
${MAKE} -C src lib
all:
${MAKE} -C src
diet:
${MAKE} -C src diet
@ -21,3 +18,6 @@ clean:
make -C src clean
make -C test clean
rm -rf doc/html doc/latex doc/man
help:
@/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc\n\tmake test\n\tmake doc"

View file

@ -2,24 +2,21 @@ OPT = -O2
DEBUG = 2
CFLAGS = -I../include -Wall ${OPT}
DIET = diet
WRAPPER =
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
all: CC := ${WRAPPER} ${CC}
all: lib
help:
@/bin/echo -e "Usage:\n\tmake diet - compile with diet libc\n\tmake lib - compile with normal gnu libc"
debug: CFLAGS += -DDEBUG=${DEBUG} -g
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
debug: lib
diet: WRAPPER = ${DIET}
diet: CC := ${WRAPPER} ${CC}
diet: lib
lib: CC := ${WRAPPER} ${CC}
lib: $O
@mkdir -p ../lib
${WRAPPER} ar rcs ../lib/libpsyc.a $O
@ -34,3 +31,6 @@ it: match
clean:
rm -f $O ../lib/libpsyc.a
help:
@/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc"