|
|
|
@ -1,11 +1,12 @@
|
|
|
|
|
OUT=webdis
|
|
|
|
|
HIREDIS_OBJ=hiredis/hiredis.o hiredis/sds.o hiredis/net.o hiredis/async.o
|
|
|
|
|
JANSSON_OBJ=jansson/src/dump.o jansson/src/error.o jansson/src/hashtable.o jansson/src/load.o jansson/src/strbuffer.o jansson/src/utf.o jansson/src/value.o jansson/src/variadic.o
|
|
|
|
|
FORMAT_OBJS=formats/json.o formats/raw.o formats/common.o formats/custom-type.o
|
|
|
|
|
HTTP_PARSER_OBJS=http-parser/http_parser.o
|
|
|
|
|
HIREDIS_OBJ?=hiredis/hiredis.o hiredis/sds.o hiredis/net.o hiredis/async.o
|
|
|
|
|
JANSSON_OBJ?=jansson/src/dump.o jansson/src/error.o jansson/src/hashtable.o jansson/src/load.o jansson/src/strbuffer.o jansson/src/utf.o jansson/src/value.o jansson/src/variadic.o
|
|
|
|
|
B64_OBJS?=b64/cencode.o
|
|
|
|
|
FORMAT_OBJS?=formats/json.o formats/raw.o formats/common.o formats/custom-type.o
|
|
|
|
|
HTTP_PARSER_OBJS?=http-parser/http_parser.o
|
|
|
|
|
|
|
|
|
|
CFLAGS=-O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser
|
|
|
|
|
LDFLAGS=-levent -pthread
|
|
|
|
|
CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser
|
|
|
|
|
LDFLAGS ?= -levent -pthread
|
|
|
|
|
|
|
|
|
|
# check for MessagePack
|
|
|
|
|
MSGPACK_LIB=$(shell ls /usr/lib/libmsgpack.so 2>/dev/null)
|
|
|
|
@ -16,8 +17,8 @@ ifneq ($(strip $(MSGPACK_LIB)),)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEPS=$(FORMAT_OBJS) $(HIREDIS_OBJ) $(JANSSON_OBJ) $(HTTP_PARSER_OBJS)
|
|
|
|
|
OBJS=webdis.o cmd.o worker.o slog.o server.o libb64/cencode.o acl.o md5/md5.o sha1/sha1.o http.o client.o websocket.o pool.o conf.o $(DEPS)
|
|
|
|
|
DEPS=$(FORMAT_OBJS) $(HIREDIS_OBJ) $(JANSSON_OBJ) $(HTTP_PARSER_OBJS) $(B64_OBJS)
|
|
|
|
|
OBJS=webdis.o cmd.o worker.o slog.o server.o acl.o md5/md5.o sha1/sha1.o http.o client.o websocket.o pool.o conf.o $(DEPS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -49,3 +50,17 @@ clean:
|
|
|
|
|
install: $(OUT) $(INSTALL_DIRS)
|
|
|
|
|
cp $(OUT) $(DESTDIR)/$(PREFIX)/bin
|
|
|
|
|
cp webdis.prod.json $(CONFDIR)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WEBDIS_PORT ?= 7379
|
|
|
|
|
|
|
|
|
|
test_all: test perftest
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
python tests/basic.py
|
|
|
|
|
python tests/limits.py
|
|
|
|
|
./tests/pubsub -p $(WEBDIS_PORT)
|
|
|
|
|
|
|
|
|
|
perftest:
|
|
|
|
|
# This is a performance test that requires apache2-utils and curl
|
|
|
|
|
./tests/bench.sh
|
|
|
|
|