-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathconfig
92 lines (75 loc) · 2.91 KB
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
ngx_addon_name=ngx_rtmp_kmp_module
# ngx_kmp_out_module dependency
#
if test -n "$ngx_module_link"; then
if test -n "$KMP_OUT_CORE_SRCS"; then
echo "found ngx_kmp_out_module for $ngx_addon_name; looks good."
else
echo "error: ngx_kmp_out_module is required to build $ngx_addon_name; please put it before $ngx_addon_name." 1>&2
exit 1
fi
else
if echo $NGX_ADDON_SRCS | grep "ngx_kmp_out_module" > /dev/null; then
echo "found ngx_kmp_out_module for $ngx_addon_name; looks good."
else
echo "error: ngx_kmp_out_module is required to build $ngx_addon_name; please put it before $ngx_addon_name." 1>&2
exit 1
fi
fi
# version
#
RTMP_KMP_DEFAULT_VERSION=0.1
RTMP_KMP_VERSION=${RTMP_KMP_VERSION:-`git --git-dir=$ngx_addon_dir/.git describe 2>/dev/null`}
RTMP_KMP_VERSION=${RTMP_KMP_VERSION:-$RTMP_KMP_DEFAULT_VERSION}
echo "#define NGX_RTMP_KMP_VERSION \""$RTMP_KMP_VERSION"\"" > $NGX_OBJS/ngx_rtmp_kmp_version.h
# source
#
RTMP_KMP_CORE_MODULES=" \
ngx_rtmp_kmp_module \
"
RTMP_KMP_HTTP_MODULES=" \
ngx_http_rtmp_kmp_api_module \
"
RTMP_KMP_CORE_SRCS=" \
$ngx_addon_dir/src/ngx_rtmp_kmp_api.c \
$ngx_addon_dir/src/ngx_rtmp_kmp_module.c \
$ngx_addon_dir/src/ngx_rtmp_kmp_track.c \
"
RTMP_KMP_HTTP_SRCS=" \
$ngx_addon_dir/src/ngx_http_rtmp_kmp_api_module.c \
"
RTMP_KMP_DEPS=" \
$ngx_addon_dir/src/ngx_http_rtmp_kmp_api_json.h \
$ngx_addon_dir/src/ngx_http_rtmp_kmp_api_routes.h \
$ngx_addon_dir/src/ngx_rtmp_kmp_api.h \
$ngx_addon_dir/src/ngx_rtmp_kmp_api_json.h \
$ngx_addon_dir/src/ngx_rtmp_kmp_json.h \
$ngx_addon_dir/src/ngx_rtmp_kmp_module.h \
$ngx_addon_dir/src/ngx_rtmp_kmp_track.h \
$ngx_addon_dir/src/ngx_rtmp_kmp_track_json.h \
"
if [ -f auto/module ] ; then
ngx_module_deps=$RTMP_KMP_DEPS
ngx_module_incs=
ngx_module_libs=
if [ $ngx_module_link = DYNAMIC ] ; then
ngx_module_name="$RTMP_KMP_CORE_MODULES $RTMP_KMP_HTTP_MODULES"
ngx_module_srcs="$RTMP_KMP_CORE_SRCS $RTMP_KMP_HTTP_SRCS"
. auto/module
else
ngx_module_type=CORE
ngx_module_name=$RTMP_KMP_CORE_MODULES
ngx_module_srcs=$RTMP_KMP_CORE_SRCS
. auto/module
ngx_module_deps=
ngx_module_type=HTTP
ngx_module_name=$RTMP_KMP_HTTP_MODULES
ngx_module_srcs=$RTMP_KMP_HTTP_SRCS
. auto/module
fi
else
CORE_MODULES="$CORE_MODULES $RTMP_KMP_CORE_MODULES"
HTTP_MODULES="$HTTP_MODULES $RTMP_KMP_HTTP_MODULES"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $RTMP_KMP_DEPS"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $RTMP_KMP_CORE_SRCS $RTMP_KMP_HTTP_SRCS"
fi