-
Notifications
You must be signed in to change notification settings - Fork 26
/
config
109 lines (89 loc) · 3.86 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
ngx_addon_name="ngx_kmp_rtmp_module"
# ngx_kmp_in_module dependency
#
if test -n "$ngx_module_link"; then
if test -n "$KMP_IN_CORE_SRCS"; then
echo "found ngx_kmp_in_module for $ngx_addon_name; looks good."
else
echo "error: ngx_kmp_in_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_in_module" > /dev/null; then
echo "found ngx_kmp_in_module for $ngx_addon_name; looks good."
else
echo "error: ngx_kmp_in_module is required to build $ngx_addon_name; please put it before $ngx_addon_name." 1>&2
exit 1
fi
fi
# version
#
KMP_RTMP_DEFAULT_VERSION=0.1
KMP_RTMP_VERSION=${KMP_RTMP_VERSION:-`git --git-dir=$ngx_addon_dir/.git describe 2>/dev/null`}
KMP_RTMP_VERSION=${KMP_RTMP_VERSION:-$KMP_RTMP_DEFAULT_VERSION}
echo "#define NGX_KMP_RTMP_VERSION \""$KMP_RTMP_VERSION"\"" > $NGX_OBJS/ngx_kmp_rtmp_version.h
# source
#
KMP_RTMP_STREAM_MODULES=" \
ngx_stream_kmp_rtmp_module \
"
KMP_RTMP_HTTP_MODULES=" \
ngx_http_kmp_rtmp_api_module \
"
KMP_RTMP_CORE_SRCS=" \
$ngx_addon_dir/src/ngx_kmp_rtmp_amf.c \
$ngx_addon_dir/src/ngx_kmp_rtmp_encoder.c \
$ngx_addon_dir/src/ngx_kmp_rtmp_handshake.c \
$ngx_addon_dir/src/ngx_kmp_rtmp_stream.c \
$ngx_addon_dir/src/ngx_kmp_rtmp_track.c \
$ngx_addon_dir/src/ngx_kmp_rtmp_upstream.c \
"
KMP_RTMP_STREAM_SRCS=" \
$ngx_addon_dir/src/ngx_stream_kmp_rtmp_module.c \
"
KMP_RTMP_HTTP_SRCS=" \
$ngx_addon_dir/src/ngx_http_kmp_rtmp_api_module.c \
"
KMP_RTMP_DEPS=" \
$ngx_addon_dir/src/ngx_http_kmp_rtmp_api_json.h \
$ngx_addon_dir/src/ngx_http_kmp_rtmp_api_routes.h \
$ngx_addon_dir/src/ngx_kmp_rtmp.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_amf.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_encoder.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_handshake.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_stream.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_stream_json.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_track.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_track_json.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_upstream.h \
$ngx_addon_dir/src/ngx_kmp_rtmp_upstream_json.h \
"
if [ -f auto/module ] ; then
ngx_module_deps=$KMP_RTMP_DEPS
ngx_module_incs=
ngx_module_libs=
if [ $ngx_module_link = DYNAMIC ] ; then
ngx_module_name="$KMP_RTMP_STREAM_MODULES $KMP_RTMP_HTTP_MODULES"
ngx_module_srcs="$KMP_RTMP_CORE_SRCS $KMP_RTMP_STREAM_SRCS $KMP_RTMP_HTTP_SRCS"
. auto/module
else
ngx_module_type=CORE
ngx_module_name=
ngx_module_srcs=$KMP_RTMP_CORE_SRCS
. auto/module
ngx_module_deps=
ngx_module_type=STREAM
ngx_module_name=$KMP_RTMP_STREAM_MODULES
ngx_module_srcs=$KMP_RTMP_STREAM_SRCS
. auto/module
ngx_module_type=HTTP
ngx_module_name=$KMP_RTMP_HTTP_MODULES
ngx_module_srcs=$KMP_RTMP_HTTP_SRCS
. auto/module
fi
else
STREAM_MODULES="$STREAM_MODULES $KMP_RTMP_STREAM_MODULES"
HTTP_MODULES="$HTTP_MODULES $KMP_RTMP_HTTP_MODULES"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $KMP_RTMP_DEPS"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $KMP_RTMP_CORE_SRCS $KMP_RTMP_STREAM_SRCS $KMP_RTMP_HTTP_SRCS"
fi