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

Makefile improvements

This commit is contained in:
tg(x) 2011-04-30 15:42:48 +02:00
parent 917474e6f3
commit 1b49ff9605
3 changed files with 52 additions and 36 deletions

View file

@ -1,40 +1,51 @@
CFLAGS=-I../include -DDEBUG -g -O0 -Wall
LDFLAGS=-L../lib
LOADLIBES=-lpsyc -lm
TARGETS=testServer testParser testMatch testRender isRoutingVar getVarType
PORT=4440
OPT = -O2
DEBUG = 2
CFLAGS = -I../include -Wall ${OPT}
LDFLAGS = -L../lib
LOADLIBES = -lpsyc -lm
TARGETS = testServer testParser testMatch testRender isRoutingVar getVarType
WRAPPER =
DIET = diet
PORT = 4440
all: $(TARGETS)
all: test
diet: WRAPPER = ${DIET}
diet: all
debug: CFLAGS += -DDEBUG=${DEBUG} -g
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
debug: all
test: ${TARGETS}
./testRender
./testMatch
./isRoutingVar
./getVarType
test: $(TARGETS)
for f in packets/full-* packets/error-*; do echo ">> $$f"; ./testParser $$f; done
for f in packets/full-*; do echo ">> $$f"; ./testParser $$f; done
netstart:
./testServer $(PORT)
./testServer ${PORT}
netstartv:
./testServer $(PORT) -v
./testServer ${PORT} -v
nettest:
for f in packets/full-*; do echo ">> $$f"; cat $$f | nc localhost $(PORT) | diff -u $$f -; done
for f in packets/full-*; do echo ">> $$f"; cat $$f | nc localhost ${PORT} | diff -u $$f -; done
nettesterr:
for f in packets/error-*; do echo ">> $$f"; cat $$f | nc localhost $(PORT); done
for f in packets/error-*; do echo ">> $$f"; cat $$f | nc localhost ${PORT}; done
splittest:
for f in packets/full-*; do echo ">> $$f"; ./splittest.pl $$f $(PORT) | diff -u $$f -; done
for f in packets/full-*; do echo ">> $$f"; ./splittest.pl $$f ${PORT} | diff -u $$f -; done
nettestp1:
(for f in packets/part-1-p*; do cat $$f; done) | nc localhost $(PORT) | diff -u packets/full-1 -
(for f in packets/part-1-p*; do cat $$f; done) | nc localhost ${PORT} | diff -u packets/full-1 -
nettestp2:
(for f in packets/part-1-length-p*; do cat $$f; done) | nc localhost $(PORT) | diff -u packets/full-1-length -
(for f in packets/part-1-length-p*; do cat $$f; done) | nc localhost ${PORT} | diff -u packets/full-1-length -
clean:
rm -f $(TARGETS)
rm -f ${TARGETS}
it: all