mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
Makefile fixes
This commit is contained in:
parent
c0e4edadb3
commit
5496700af0
2 changed files with 10 additions and 10 deletions
10
Makefile
10
Makefile
|
@ -2,11 +2,8 @@
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
.PHONY: lib
|
.PHONY: lib
|
||||||
|
|
||||||
default:
|
all:
|
||||||
@/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"
|
${MAKE} -C src
|
||||||
|
|
||||||
lib:
|
|
||||||
${MAKE} -C src lib
|
|
||||||
|
|
||||||
diet:
|
diet:
|
||||||
${MAKE} -C src diet
|
${MAKE} -C src diet
|
||||||
|
@ -21,3 +18,6 @@ clean:
|
||||||
make -C src clean
|
make -C src clean
|
||||||
make -C test clean
|
make -C test clean
|
||||||
rm -rf doc/html doc/latex doc/man
|
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"
|
||||||
|
|
10
src/Makefile
10
src/Makefile
|
@ -2,24 +2,21 @@ OPT = -O2
|
||||||
DEBUG = 2
|
DEBUG = 2
|
||||||
CFLAGS = -I../include -Wall ${OPT}
|
CFLAGS = -I../include -Wall ${OPT}
|
||||||
DIET = diet
|
DIET = diet
|
||||||
WRAPPER =
|
|
||||||
|
|
||||||
S = packet.c misc.c parser.c match.c render.c memmem.c itoa.c variable.c
|
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
|
O = packet.o misc.o parser.o match.o render.o memmem.o itoa.o variable.o
|
||||||
|
|
||||||
|
all: CC := ${WRAPPER} ${CC}
|
||||||
all: lib
|
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 += -DDEBUG=${DEBUG} -g
|
||||||
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
|
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
|
||||||
debug: lib
|
debug: lib
|
||||||
|
|
||||||
diet: WRAPPER = ${DIET}
|
diet: WRAPPER = ${DIET}
|
||||||
|
diet: CC := ${WRAPPER} ${CC}
|
||||||
diet: lib
|
diet: lib
|
||||||
|
|
||||||
lib: CC := ${WRAPPER} ${CC}
|
|
||||||
lib: $O
|
lib: $O
|
||||||
@mkdir -p ../lib
|
@mkdir -p ../lib
|
||||||
${WRAPPER} ar rcs ../lib/libpsyc.a $O
|
${WRAPPER} ar rcs ../lib/libpsyc.a $O
|
||||||
|
@ -34,3 +31,6 @@ it: match
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $O ../lib/libpsyc.a
|
rm -f $O ../lib/libpsyc.a
|
||||||
|
|
||||||
|
help:
|
||||||
|
@/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc"
|
||||||
|
|
Loading…
Reference in a new issue