-
Notifications
You must be signed in to change notification settings - Fork 27
/
config
125 lines (104 loc) · 4.26 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
ngx_addon_name="ngx_kmp_cc_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
# 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
#
KMP_CC_DEFAULT_VERSION=0.1
KMP_CC_VERSION=${KMP_CC_VERSION:-`git --git-dir=$ngx_addon_dir/.git describe 2>/dev/null`}
KMP_CC_VERSION=${KMP_CC_VERSION:-$KMP_CC_DEFAULT_VERSION}
echo "#define NGX_KMP_CC_VERSION \""$KMP_CC_VERSION"\"" > $NGX_OBJS/ngx_kmp_cc_version.h
# source
#
KMP_CC_STREAM_MODULES=" \
ngx_stream_kmp_cc_module \
"
KMP_CC_HTTP_MODULES=" \
ngx_http_kmp_cc_api_module \
"
KMP_CC_CORE_SRCS=" \
$ngx_addon_dir/src/media/cea708.c \
$ngx_addon_dir/src/media/eia608.c \
$ngx_addon_dir/src/media/webvtt.c \
$ngx_addon_dir/src/ngx_buf_chain_reader.c \
$ngx_addon_dir/src/ngx_kmp_cc.c \
"
KMP_CC_STREAM_SRCS=" \
$ngx_addon_dir/src/ngx_stream_kmp_cc_module.c \
"
KMP_CC_HTTP_SRCS=" \
$ngx_addon_dir/src/ngx_http_kmp_cc_api_module.c \
"
KMP_CC_DEPS=" \
$ngx_addon_dir/src/media/cea708.h \
$ngx_addon_dir/src/media/decoder.h \
$ngx_addon_dir/src/media/eia608.h \
$ngx_addon_dir/src/media/webvtt.h \
$ngx_addon_dir/src/ngx_buf_chain_reader.h \
$ngx_addon_dir/src/ngx_http_kmp_cc_api_json.h \
$ngx_addon_dir/src/ngx_http_kmp_cc_api_routes.h \
$ngx_addon_dir/src/ngx_kmp_cc.h \
$ngx_addon_dir/src/ngx_kmp_cc_json.h \
$ngx_addon_dir/src/ngx_stream_kmp_cc_module.h \
$ngx_addon_dir/src/ngx_stream_kmp_cc_module_json.h \
"
if [ -f auto/module ] ; then
ngx_module_deps=$KMP_CC_DEPS
ngx_module_incs=
ngx_module_libs=
if [ $ngx_module_link = DYNAMIC ] ; then
ngx_module_name="$KMP_CC_STREAM_MODULES $KMP_CC_HTTP_MODULES"
ngx_module_srcs="$KMP_CC_CORE_SRCS $KMP_CC_STREAM_SRCS $KMP_CC_HTTP_SRCS"
. auto/module
else
ngx_module_type=CORE
ngx_module_name=
ngx_module_srcs=$KMP_CC_CORE_SRCS
. auto/module
ngx_module_deps=
ngx_module_type=STREAM
ngx_module_name=$KMP_CC_STREAM_MODULES
ngx_module_srcs=$KMP_CC_STREAM_SRCS
. auto/module
ngx_module_type=HTTP
ngx_module_name=$KMP_CC_HTTP_MODULES
ngx_module_srcs=$KMP_CC_HTTP_SRCS
. auto/module
fi
else
STREAM_MODULES="$STREAM_MODULES $KMP_CC_STREAM_MODULES"
HTTP_MODULES="$HTTP_MODULES $KMP_CC_HTTP_MODULES"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $KMP_CC_DEPS"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $KMP_CC_CORE_SRCS $KMP_CC_STREAM_SRCS $KMP_CC_HTTP_SRCS"
fi