2011-04-30 13:42:48 +00:00
|
|
|
OPT = -O2
|
|
|
|
DEBUG = 2
|
2011-05-03 23:00:35 +00:00
|
|
|
CFLAGS = -I../include -Wall -std=c99 ${OPT}
|
2011-04-30 13:42:48 +00:00
|
|
|
LDFLAGS = -L../lib
|
|
|
|
LOADLIBES = -lpsyc -lm
|
2011-05-03 20:18:35 +00:00
|
|
|
TARGETS = testServer testParser testMatch testRender testText isRoutingVar getVarType
|
2011-04-30 13:42:48 +00:00
|
|
|
WRAPPER =
|
|
|
|
DIET = diet
|
|
|
|
PORT = 4440
|
|
|
|
|
2011-04-30 14:41:30 +00:00
|
|
|
all: ${TARGETS}
|
2011-04-30 13:42:48 +00:00
|
|
|
|
|
|
|
diet: WRAPPER = ${DIET}
|
|
|
|
diet: all
|
|
|
|
|
|
|
|
debug: CFLAGS += -DDEBUG=${DEBUG} -g
|
|
|
|
debug: CFLAGS := $(subst ${OPT},-O0,${CFLAGS})
|
|
|
|
debug: all
|
|
|
|
|
|
|
|
test: ${TARGETS}
|
2011-04-25 21:58:07 +00:00
|
|
|
./testRender
|
|
|
|
./testMatch
|
2011-05-03 23:00:35 +00:00
|
|
|
./testText
|
2011-04-25 21:58:07 +00:00
|
|
|
./isRoutingVar
|
2011-04-29 21:11:48 +00:00
|
|
|
./getVarType
|
2011-05-04 15:44:12 +00:00
|
|
|
for f in packets/[0-9]*; do echo ">> $$f"; ./testParser $$f; done
|
|
|
|
for f in packets/[0-9]*; do echo ">> $$f"; ./testParser $$f -r; done
|
2011-04-27 17:18:17 +00:00
|
|
|
|
2011-05-03 23:00:35 +00:00
|
|
|
testServer: CFLAGS := $(subst -std=c99,,${CFLAGS})
|
|
|
|
|
2011-04-29 02:12:55 +00:00
|
|
|
netstart:
|
2011-04-30 13:42:48 +00:00
|
|
|
./testServer ${PORT}
|
2011-04-29 02:12:55 +00:00
|
|
|
|
2011-04-30 15:07:01 +00:00
|
|
|
netstartr:
|
|
|
|
./testServer ${PORT} -r
|
|
|
|
|
2011-04-29 02:12:55 +00:00
|
|
|
netstartv:
|
2011-04-30 13:42:48 +00:00
|
|
|
./testServer ${PORT} -v
|
2011-04-29 02:12:55 +00:00
|
|
|
|
2011-04-30 15:07:01 +00:00
|
|
|
netstartrv:
|
2011-05-04 13:41:35 +00:00
|
|
|
./testServer ${PORT} -rv
|
2011-04-30 15:07:01 +00:00
|
|
|
|
2011-05-04 16:09:01 +00:00
|
|
|
nettest: nettestfull nettestsplit
|
|
|
|
|
|
|
|
nettestfull:
|
2011-05-04 15:44:12 +00:00
|
|
|
for f in packets/[0-9]*; do echo ">> $$f"; cat $$f | nc localhost ${PORT} | diff -u $$f -; done
|
2011-04-29 01:20:00 +00:00
|
|
|
|
2011-05-04 16:09:01 +00:00
|
|
|
nettestsplit:
|
|
|
|
for f in packets/[0-9]*; do echo ">> $$f"; ./splittest.pl $$f ${PORT} | diff -u $$f -; done
|
|
|
|
|
2011-04-29 01:20:00 +00:00
|
|
|
nettesterr:
|
2011-05-04 15:44:12 +00:00
|
|
|
for f in packets/err-*; do echo ">> $$f"; cat $$f | nc localhost ${PORT}; done
|
2011-04-27 17:18:17 +00:00
|
|
|
|
2011-04-17 19:46:00 +00:00
|
|
|
clean:
|
2011-04-30 13:42:48 +00:00
|
|
|
rm -f ${TARGETS}
|
2011-04-22 09:50:13 +00:00
|
|
|
|
|
|
|
it: all
|