Browse Source

#80 - fixed

tags/v2.3.7
dedok 2 years ago
parent
commit
061ff3ad0b
6 changed files with 24 additions and 20 deletions
  1. 15
    10
      Makefile
  2. 1
    1
      README.md
  3. 6
    3
      config
  4. 1
    1
      src/ngx_http_tnt_version.h
  5. 0
    4
      src/tp_transcode.c
  6. 1
    1
      third_party/msgpuck

+ 15
- 10
Makefile View File

@@ -21,6 +21,7 @@ INC_FLAGS += -I$(CUR_PATH)/third_party/msgpuck
INC_FLAGS += -I$(CUR_PATH)/src
YAJL_LIB = $(YAJL_PATH)/build/yajl-2.1.0/lib/libyajl_s.a
LDFLAGS = -L$(YAJL_PATH)/build/yajl-2.1.0/lib
LDFLAGS += -L$(MODULE_PATH)/third_party/msgpuck
PREFIX = /usr/local/nginx

DEV_CFLAGS += -ggdb3 -O0 -Wall -Werror
@@ -28,14 +29,16 @@ DEV_CFLAGS += -ggdb3 -O0 -Wall -Werror
.PHONY: all build
all: build

yajl-dynamic:
ln -sf src third_party/yajl/yajl
cd $(YAJL_PATH); CFLAGS=" $(CFLAGS) -fPIC" ./configure; make distro

yajl:
ln -sf src third_party/yajl/yajl
cd $(YAJL_PATH); ./configure; make distro

msgpack:
cd $(MODULE_PATH)/third_party/msgpuck && \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo . && \
make && \
cd -

gen_version:
$(shell cat $(MODULE_PATH)/src/ngx_http_tnt_version.h.in | sed 's/@VERSION_STRING@/"$(shell git describe --tags --dirty)"/g' > $(MODULE_PATH)/src/ngx_http_tnt_version.h)

@@ -85,7 +88,8 @@ json2tp:
src/json_encoders.c \
src/tp_transcode.c \
-o misc/json2tp \
-lyajl_s
-lyajl_s \
-lmsgpuck

tp_dump:
$(CC) $(CFLAGS) $(DEV_CFLAGS) $(INC_FLAGS) $(LDFLAGS)\
@@ -93,7 +97,8 @@ tp_dump:
src/json_encoders.c \
src/tp_transcode.c \
-o misc/tp_dump \
-lyajl_s
-lyajl_s \
-lmsgpuck

test-dev-man: utils build
$(CUR_PATH)/test/transcode.sh
@@ -117,8 +122,8 @@ clean:

utils: json2tp tp_dump

build-all: yajl configure build utils
build-all-dynamic: yajl-dynamic configure-as-dynamic build utils
build-all: msgpack yajl configure build utils
build-all-dynamic: msgpack yajl configure-as-dynamic build utils

build-all-debug: yajl configure-debug build utils
build-all-dynamic-debug: yajl-dynamic configure-as-dynamic-debug build utils
build-all-debug: msgpack yajl configure-debug build utils
build-all-dynamic-debug: msgpack yajl configure-as-dynamic-debug build utils

+ 1
- 1
README.md View File

@@ -73,7 +73,7 @@ make build-all # or 'build-all-debug' for debug version
Requirements (for details, see REPO_ROOT/Makefile)
libyajl >= 2.0(https://lloyd.github.io/yajl/)
libmsgpuck >= 1.0 (https://github.com/rtsisyk/msgpuck)
libmsgpuck >= 2.0 (https://github.com/rtsisyk/msgpuck)
$ ./configure --add-module=REPO_ROOT && make

+ 6
- 3
config View File

@@ -1,6 +1,9 @@
ngx_addon_name="ngx_http_tnt_module"

__lib_yajl="$ngx_addon_dir/third_party/yajl/build/yajl-2.1.0/lib/libyajl_s.a"
__libs=" \
$ngx_addon_dir/third_party/yajl/build/yajl-2.1.0/lib/libyajl_s.a \
$ngx_addon_dir/third_party/msgpuck/libmsgpuck.a \
"

__module_src_dir="$ngx_addon_dir/src"

@@ -42,7 +45,7 @@ if test "$__old_style_build" = "yes"; then
CORE_LIBS=" \
$CORE_LIBS \
$ngx_feature_libs \
$__lib_yajl \
$__libs \
"

HTTP_MODULES=" \
@@ -68,7 +71,7 @@ else
ngx_module_incs=$__include_paths
ngx_module_deps=$__headers
ngx_module_srcs=$__sources
ngx_module_libs=$__lib_yajl
ngx_module_libs=$__libs

. auto/module
# ]]

+ 1
- 1
src/ngx_http_tnt_version.h View File

@@ -33,6 +33,6 @@
#ifndef NGX_HTTP_TNT_VERSION_H
#define NGX_HTTP_TNT_VERSION_H 1

#define NGX_HTTP_TNT_MODULE_VERSION_STRING "v2.3.6"
#define NGX_HTTP_TNT_MODULE_VERSION_STRING "v2.3.7"

#endif

+ 0
- 4
src/tp_transcode.c View File

@@ -38,10 +38,6 @@
# define GNU_SOURCES 1
#endif /* !GNU_SOURCES */

#if !defined(MP_SOURCE)
# define MP_SOURCE 1
#endif /* !MP_SOURCE */

#include "tp_ext.h"
#include "tp_transcode.h"
#include "json_encoders.h"

+ 1
- 1
third_party/msgpuck

@@ -1 +1 @@
Subproject commit a3a1964cacfc9d4ba0e927dc3923c89871269760
Subproject commit 2598bce249077ca49ba311247e03b2a10558bbbb

Loading…
Cancel
Save