mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add comments for configure
This commit is contained in:
parent
979ee7d39c
commit
7e0cf2b9fc
1 changed files with 23 additions and 7 deletions
30
trunk/configure
vendored
30
trunk/configure
vendored
|
@ -37,8 +37,9 @@ echo "" >> $SRS_AUTO_HEADERS_H
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# generate Makefile.
|
# generate Makefile.
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
echo "generate Makefile"
|
|
||||||
|
|
||||||
|
#####################################################################################
|
||||||
|
echo "generate Makefile"
|
||||||
SRS_MAKEFILE="Makefile"
|
SRS_MAKEFILE="Makefile"
|
||||||
cat << END > ${SRS_MAKEFILE}
|
cat << END > ${SRS_MAKEFILE}
|
||||||
.PHONY: default help clean server bandwidth _prepare_dir
|
.PHONY: default help clean server bandwidth _prepare_dir
|
||||||
|
@ -67,8 +68,8 @@ _prepare_dir:
|
||||||
@mkdir -p ${SRS_OBJS}
|
@mkdir -p ${SRS_OBJS}
|
||||||
END
|
END
|
||||||
|
|
||||||
echo 'generate Makefile ok!'
|
#####################################################################################
|
||||||
|
# build tools or compiler args.
|
||||||
# the performance analysis, uncomments the following when use gperf to analysis the performance. see third-party/readme.txt
|
# the performance analysis, uncomments the following when use gperf to analysis the performance. see third-party/readme.txt
|
||||||
Performance="-pg"
|
Performance="-pg"
|
||||||
# enable gdb debug
|
# enable gdb debug
|
||||||
|
@ -92,14 +93,23 @@ default:
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
# Libraries
|
#####################################################################################
|
||||||
|
# Libraries, external library to build in srs,
|
||||||
|
# header(.h): add to ModuleLibIncs if need the specified library. for example, LibSTRoot
|
||||||
|
# library(.a): add to ModuleLibFiles if binary need the specifeid library. for example, LibSTfile
|
||||||
|
#
|
||||||
|
# st(state-threads) the basic network library for SRS.
|
||||||
LibSTRoot="${SRS_OBJS}/st"
|
LibSTRoot="${SRS_OBJS}/st"
|
||||||
LibSTfile="${LibSTRoot}/libst.a"
|
LibSTfile="${LibSTRoot}/libst.a"
|
||||||
|
# hp(http-parser) the http request/url parser, for SRS to support HTTP callback.
|
||||||
if [ $SRS_HTTP = YES ]; then
|
if [ $SRS_HTTP = YES ]; then
|
||||||
LibHttpParserRoot="${SRS_OBJS}/hp"
|
LibHttpParserRoot="${SRS_OBJS}/hp"
|
||||||
LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"
|
LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#####################################################################################
|
||||||
|
# Modules, compile each module, then link to binary
|
||||||
|
#
|
||||||
#Core Module
|
#Core Module
|
||||||
MODULE_ID="CORE"
|
MODULE_ID="CORE"
|
||||||
MODULE_DEPENDS=()
|
MODULE_DEPENDS=()
|
||||||
|
@ -118,7 +128,7 @@ MODULE_FILES=("srs_core" "srs_core_log" "srs_core_server"
|
||||||
"srs_core_http" "srs_core_thread" "srs_core_bandwidth")
|
"srs_core_http" "srs_core_thread" "srs_core_bandwidth")
|
||||||
MODULE_DIR="src/core" . auto/modules.sh
|
MODULE_DIR="src/core" . auto/modules.sh
|
||||||
CORE_OBJS="${MODULE_OBJS[@]}"
|
CORE_OBJS="${MODULE_OBJS[@]}"
|
||||||
|
#
|
||||||
#Main Module
|
#Main Module
|
||||||
MODULE_ID="MAIN"
|
MODULE_ID="MAIN"
|
||||||
MODULE_DEPENDS=("CORE")
|
MODULE_DEPENDS=("CORE")
|
||||||
|
@ -127,21 +137,27 @@ MODULE_FILES=("srs_main_server" "srs_main_bandcheck")
|
||||||
MODULE_DIR="src/main" . auto/modules.sh
|
MODULE_DIR="src/main" . auto/modules.sh
|
||||||
MAIN_OBJS="${MODULE_OBJS[@].o}"
|
MAIN_OBJS="${MODULE_OBJS[@].o}"
|
||||||
|
|
||||||
|
#####################################################################################
|
||||||
|
# Binaries, main entrances, link the module and its depends modules,
|
||||||
|
# then link to a binary, for example, objs/srs
|
||||||
|
#
|
||||||
# all main entrances
|
# all main entrances
|
||||||
MAIN_ENTRANCES=("srs_main_server" "srs_main_bandcheck")
|
MAIN_ENTRANCES=("srs_main_server" "srs_main_bandcheck")
|
||||||
|
# all depends libraries
|
||||||
# srs(simple rtmp server) over st(state-threads)
|
|
||||||
ModuleLibFiles=(${LibSTfile})
|
ModuleLibFiles=(${LibSTfile})
|
||||||
if [ $SRS_HTTP = YES ]; then
|
if [ $SRS_HTTP = YES ]; then
|
||||||
ModuleLibFiles="${ModuleLibFiles[@]} ${LibHttpParserfile}"
|
ModuleLibFiles="${ModuleLibFiles[@]} ${LibHttpParserfile}"
|
||||||
fi
|
fi
|
||||||
|
# all depends objects
|
||||||
MODULE_OBJS="${CORE_OBJS[@]} ${CONFIG_OBJS[@]} ${PROTOCOL_OBJS[@]} ${MAIN_OBJS[@]}"
|
MODULE_OBJS="${CORE_OBJS[@]} ${CONFIG_OBJS[@]} ${PROTOCOL_OBJS[@]} ${MAIN_OBJS[@]}"
|
||||||
if [ $SRS_SSL = YES ]; then
|
if [ $SRS_SSL = YES ]; then
|
||||||
LINK_OPTIONS="-ldl -lssl -lcrypto"
|
LINK_OPTIONS="-ldl -lssl -lcrypto"
|
||||||
else
|
else
|
||||||
LINK_OPTIONS="-ldl"
|
LINK_OPTIONS="-ldl"
|
||||||
fi
|
fi
|
||||||
|
# srs(simple rtmp server) over st(state-threads)
|
||||||
BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" SO_PATH="" . auto/apps.sh
|
BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" SO_PATH="" . auto/apps.sh
|
||||||
|
# bandwidth test tool, to test the bandwidth to server
|
||||||
BUILD_KEY="bandwidth" APP_MAIN="srs_main_bandcheck" APP_NAME="bandwidth" SO_PATH="" . auto/apps.sh
|
BUILD_KEY="bandwidth" APP_MAIN="srs_main_bandcheck" APP_NAME="bandwidth" SO_PATH="" . auto/apps.sh
|
||||||
|
|
||||||
echo 'configure ok! '
|
echo 'configure ok! '
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue