2013-10-17 12:58:04 +00:00
#!/bin/bash
2014-02-28 05:17:31 +00:00
#####################################################################################
# the main output dir, all configure and make output are in this dir.
#####################################################################################
# create the main objs
2014-11-08 08:07:31 +00:00
SRS_WORKDIR="."
SRS_OBJS_DIR="objs"
SRS_OBJS="${SRS_WORKDIR}/${SRS_OBJS_DIR}"
2015-03-10 10:07:43 +00:00
SRS_MAKEFILE="Makefile"
2013-10-17 12:58:04 +00:00
2014-03-04 03:09:41 +00:00
# linux shell color support.
2015-03-10 04:50:27 +00:00
RED="\\033[31m"
GREEN="\\033[32m"
YELLOW="\\033[33m"
BLACK="\\033[0m"
2014-03-04 03:09:41 +00:00
2015-03-14 01:52:47 +00:00
#####################################################################################
# parse user options, set the variables like:
# srs features: SRS_SSL/SRS_HLS/SRS_NGINX/SRS_FFMPEG_TOOL/SRS_HTTP_CALLBACK/......
# build options: SRS_JOBS
#####################################################################################
# parse options, exit with error when parse options invalid.
. auto/options.sh
2015-09-23 03:54:53 +00:00
# setup variables when options parsed.
. auto/setup_variables.sh
2015-03-10 05:13:31 +00:00
# clean the exists, when not export srs-librtmp.
# do this only when the options is ok.
if [[ -f Makefile ]]; then
2015-03-14 01:52:47 +00:00
make clean
2015-03-10 05:13:31 +00:00
fi
# remove makefile
rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}
2015-03-10 10:07:43 +00:00
# create objs
mkdir -p ${SRS_OBJS}
2014-11-08 07:31:21 +00:00
# for export srs-librtmp, change target to it.
2014-11-08 10:33:15 +00:00
. auto/generate-srs-librtmp-project.sh
2014-11-08 07:31:21 +00:00
2013-11-27 14:41:58 +00:00
# apply user options.
. auto/depends.sh
2015-03-07 08:33:06 +00:00
# the auto generated variables.
. auto/auto_headers.sh
2014-03-19 03:24:25 +00:00
2013-10-17 12:58:04 +00:00
#####################################################################################
# generate Makefile.
#####################################################################################
2014-03-15 11:44:06 +00:00
# ubuntu echo in Makefile cannot display color, use bash instead
SRS_BUILD_SUMMARY="_srs_build_summary.sh"
2013-10-17 12:58:04 +00:00
2014-03-02 03:31:31 +00:00
# srs-librtmp sample entry
2014-03-04 06:01:43 +00:00
SrsLibrtmpSampleEntry="nossl"
if [ $SRS_SSL = YES ]; then SrsLibrtmpSampleEntry="ssl";fi
2014-03-03 10:28:50 +00:00
# utest make entry, (cd utest; make)
2014-03-04 06:01:43 +00:00
SrsUtestMakeEntry="@echo -e \"ignore utest for it's disabled\""
2014-11-08 08:07:31 +00:00
if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS_DIR}/utest; \$(MAKE))"; fi
2014-03-03 10:28:50 +00:00
2015-03-07 08:39:05 +00:00
#####################################################################################
# finger out modules to install.
# where srs module is a dir which contains a config file.
2015-03-07 14:25:43 +00:00
SRS_MODULES=()
2015-03-07 08:39:05 +00:00
__mfiles=`find modules -name "config"` && for __mfile in $__mfiles; do
2015-03-31 10:06:55 +00:00
SRS_MODULES+=("`dirname $__mfile`")
2015-03-07 08:39:05 +00:00
done
# variables for makefile for all modules.
2016-01-04 09:28:18 +00:00
__mphonys="" && __mdefaults="" && __mcleanups="" && __makefiles=""
2015-03-07 08:39:05 +00:00
# add each modules for application
2015-03-31 10:06:55 +00:00
for SRS_MODULE in ${SRS_MODULES[*]}; do
2015-03-07 08:39:05 +00:00
echo "install module at: $SRS_MODULE"
. $SRS_MODULE/config
2016-01-04 09:28:18 +00:00
if [[ $SRS_MODULE_MAKEFILE != "" ]]; then
__makefiles="$__makefiles $SRS_MODULE_MAKEFILE"
fi
if [[ 0 -ne ${#SRS_MODULE_MAIN[@]} ]]; then
__mphonys="$__mphonys $SRS_MODULE_NAME"
__mdefaults="$__mdefaults $SRS_MODULE_NAME"
__mcleanups="$__mcleanups $SRS_MODULE_NAME"
fi
2015-03-07 08:39:05 +00:00
done
2015-03-07 08:37:29 +00:00
#####################################################################################
# build tools or compiler args.
# enable gdb debug
GDBDebug=" -g -O0"
# the warning level.
WarnLevel=" -Wall"
# the compile standard.
CppStd="-ansi"
# for library compile
2017-01-09 07:17:08 +00:00
if [[ $SRS_EXPORT_LIBRTMP_PROJECT == YES ]]; then
LibraryCompile=" -fPIC"
fi
2015-03-07 08:37:29 +00:00
# performance of gprof
SrsGprof=""; SrsGprofLink=""; if [ $SRS_GPROF = YES ]; then SrsGprof=" -pg -lc_p"; SrsGprofLink=" -pg"; fi
# performance of gperf
SrsGperf=""; SrsGperfLink=""; if [ $SRS_GPERF = YES ]; then SrsGperfLink=" -lpthread"; fi
# the cxx flag generated.
CXXFLAGS="${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}"
if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi
cat << END > ${SRS_OBJS}/${SRS_MAKEFILE}
GCC = gcc
CXX = g++
AR = ar
LINK = g++
CXXFLAGS = ${CXXFLAGS}
2015-04-20 08:25:48 +00:00
.PHONY: default srs srs_ingest_hls librtmp
2015-03-07 08:37:29 +00:00
default:
END
#####################################################################################
# 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_DIR}/st"; LibSTfile="${LibSTRoot}/libst.a"
# openssl-1.0.1f, for the RTMP complex handshake.
LibSSLRoot="";LibSSLfile=""
if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = NO ]; then LibSSLRoot="${SRS_OBJS_DIR}/openssl/include"; LibSSLfile="${SRS_OBJS_DIR}/openssl/lib/libssl.a ${SRS_OBJS_DIR}/openssl/lib/libcrypto.a"; fi fi
# gperftools-2.1, for mem check and mem/cpu profile
LibGperfRoot=""; LibGperfFile=""
if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS_DIR}/gperf/include"; LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_and_profiler.a"; fi
2016-01-08 05:58:19 +00:00
if [ $SRS_GPERF_MD = YES ]; then LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_debug.a"; fi
2015-03-07 08:37:29 +00:00
# the link options, always use static link
SrsLinkOptions="-ldl";
2016-09-15 04:59:34 +00:00
if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lssl -lcrypto"; fi fi
2015-03-07 08:37:29 +00:00
# if static specified, add static
# TODO: FIXME: remove static.
if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; fi
# if mips, add -lgcc_eh, or stl compile failed.
if [ $SRS_MIPS_UBUNTU12 = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lgcc_eh"; fi
#####################################################################################
# Modules, compile each module, then link to binary
#
#Core, depends only on system apis.
MODULE_ID="CORE"
MODULE_DEPENDS=()
ModuleLibIncs=(${SRS_OBJS_DIR})
2015-06-07 07:13:41 +00:00
MODULE_FILES=("srs_core" "srs_core_autofree" "srs_core_performance" "srs_core_mem_watch")
2015-03-07 08:37:29 +00:00
CORE_INCS="src/core"; MODULE_DIR=${CORE_INCS} . auto/modules.sh
CORE_OBJS="${MODULE_OBJS[@]}"
#
#Kernel, depends on core, provides error/log/config, nothing about stream information.
MODULE_ID="KERNEL"
MODULE_DEPENDS=("CORE")
ModuleLibIncs=(${SRS_OBJS_DIR})
2015-09-22 00:48:55 +00:00
MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_buffer"
2015-03-07 08:37:29 +00:00
"srs_kernel_utility" "srs_kernel_flv" "srs_kernel_codec" "srs_kernel_file"
"srs_kernel_consts" "srs_kernel_aac" "srs_kernel_mp3" "srs_kernel_ts"
2017-01-30 11:35:04 +00:00
"srs_kernel_stream" "srs_kernel_balance" "srs_kernel_mp4" "srs_kernel_io")
2015-03-07 08:37:29 +00:00
KERNEL_INCS="src/kernel"; MODULE_DIR=${KERNEL_INCS} . auto/modules.sh
KERNEL_OBJS="${MODULE_OBJS[@]}"
#
2015-05-24 10:56:52 +00:00
#RTMP/HTTP/Raw Protocol, depends on core/kernel, provides rtmp/htttp protocol features.
2015-05-23 01:59:24 +00:00
MODULE_ID="PROTOCOL"
2015-03-07 08:37:29 +00:00
MODULE_DEPENDS=("CORE" "KERNEL")
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSSLRoot})
2015-09-22 01:07:07 +00:00
MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_rtmp_stack"
2015-09-22 01:11:07 +00:00
"srs_rtmp_handshake" "srs_protocol_utility" "srs_rtmp_msg_array" "srs_protocol_stream"
2015-09-21 09:12:28 +00:00
"srs_raw_avc" "srs_rtsp_stack" "srs_http_stack" "srs_protocol_kbps" "srs_protocol_json"
2017-01-27 12:54:05 +00:00
"srs_kafka_stack")
2015-05-24 10:56:52 +00:00
PROTOCOL_INCS="src/protocol"; MODULE_DIR=${PROTOCOL_INCS} . auto/modules.sh
PROTOCOL_OBJS="${MODULE_OBJS[@]}"
2015-03-07 08:37:29 +00:00
#
#App Module
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
MODULE_ID="APP"
2015-05-23 01:59:24 +00:00
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL")
2015-12-07 03:35:05 +00:00
ModuleLibIncs=(${LibSTRoot} ${LibSSLRoot} ${SRS_OBJS_DIR})
2015-06-14 00:43:38 +00:00
MODULE_FILES=("srs_app_server" "srs_app_conn" "srs_app_rtmp_conn" "srs_app_source"
2015-06-14 06:06:39 +00:00
"srs_app_refer" "srs_app_hls" "srs_app_forward" "srs_app_encoder" "srs_app_http_stream"
2015-03-07 08:37:29 +00:00
"srs_app_thread" "srs_app_bandwidth" "srs_app_st" "srs_app_log" "srs_app_config"
"srs_app_pithy_print" "srs_app_reload" "srs_app_http_api" "srs_app_http_conn" "srs_app_http_hooks"
2015-08-21 08:20:19 +00:00
"srs_app_ingest" "srs_app_ffmpeg" "srs_app_utility" "srs_app_dvr" "srs_app_edge"
2015-06-14 06:06:39 +00:00
"srs_app_heartbeat" "srs_app_empty" "srs_app_http_client" "srs_app_http_static"
2015-03-11 23:26:30 +00:00
"srs_app_recv_thread" "srs_app_security" "srs_app_statistic" "srs_app_hds"
2015-05-03 02:56:20 +00:00
"srs_app_mpegts_udp" "srs_app_rtsp" "srs_app_listener" "srs_app_async_call"
2016-01-08 05:58:19 +00:00
"srs_app_caster_flv" "srs_app_process" "srs_app_ng_exec" "srs_app_kafka"
2017-02-11 04:30:21 +00:00
"srs_app_hourglass" "srs_app_dash")
2015-03-23 09:49:45 +00:00
DEFINES=""
2015-03-07 14:25:43 +00:00
# add each modules for app
2015-03-31 10:06:55 +00:00
for SRS_MODULE in ${SRS_MODULES[*]}; do
2015-03-07 14:25:43 +00:00
. $SRS_MODULE/config
2015-03-31 10:06:55 +00:00
MODULE_FILES+=("${SRS_MODULE_APP[*]}")
2015-03-23 09:49:45 +00:00
DEFINES="${DEFINES} ${SRS_MODULE_DEFINES}"
2015-03-07 14:25:43 +00:00
done
2015-03-07 08:37:29 +00:00
APP_INCS="src/app"; MODULE_DIR=${APP_INCS} . auto/modules.sh
APP_OBJS="${MODULE_OBJS[@]}"
fi
#
#LIBS Module, build libsrs.a for static link.
MODULE_ID="LIBS"
2015-05-23 01:59:24 +00:00
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL")
2015-03-07 08:37:29 +00:00
ModuleLibIncs=(${SRS_OBJS_DIR})
MODULE_FILES=("srs_librtmp" "srs_lib_simple_socket" "srs_lib_bandwidth")
LIBS_INCS="src/libs"; MODULE_DIR=${LIBS_INCS} . auto/modules.sh
LIBS_OBJS="${MODULE_OBJS[@]}"
#
#Main Module
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
MODULE_ID="MAIN"
2015-05-23 01:59:24 +00:00
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP")
2015-12-07 03:35:05 +00:00
ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS_DIR} ${LibGperfRoot} ${LibSSLRoot})
2016-12-07 04:09:39 +00:00
MODULE_FILES=("srs_main_server")
2016-01-04 09:28:18 +00:00
DEFINES=""
2015-03-07 08:39:05 +00:00
# add each modules for main
2015-03-31 10:06:55 +00:00
for SRS_MODULE in ${SRS_MODULES[*]}; do
2015-03-07 08:39:05 +00:00
. $SRS_MODULE/config
2015-03-31 10:06:55 +00:00
MODULE_FILES+=("${SRS_MODULE_MAIN[*]}")
2016-01-04 09:28:18 +00:00
DEFINES="${DEFINES} ${SRS_MODULE_DEFINES}"
2015-03-07 08:39:05 +00:00
done
2015-03-07 08:37:29 +00:00
MAIN_INCS="src/main"; MODULE_DIR=${MAIN_INCS} . auto/modules.sh
MAIN_OBJS="${MODULE_OBJS[@]}"
fi
#####################################################################################
# Binaries, main entrances, link the module and its depends modules,
# then link to a binary, for example, objs/srs
#
# disable all app when export librtmp
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
# all main entrances
2015-04-20 08:25:48 +00:00
MAIN_ENTRANCES=("srs_main_server" "srs_main_ingest_hls")
2015-03-07 08:39:05 +00:00
# add each modules for main
2015-03-31 10:06:55 +00:00
for SRS_MODULE in ${SRS_MODULES[*]}; do
2015-03-07 08:39:05 +00:00
. $SRS_MODULE/config
2015-03-31 10:06:55 +00:00
MAIN_ENTRANCES+=("${SRS_MODULE_MAIN[*]}")
2015-03-07 08:39:05 +00:00
done
2015-03-07 08:37:29 +00:00
#
# all depends libraries
2015-12-07 03:35:05 +00:00
ModuleLibFiles=(${LibSTfile} ${LibSSLfile} ${LibGperfFile})
2015-03-07 08:37:29 +00:00
# all depends objects
2015-05-24 10:56:52 +00:00
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}"
2015-03-07 08:37:29 +00:00
LINK_OPTIONS="${SrsLinkOptions}${SrsGprofLink}${SrsGperfLink}"
#
2015-03-07 08:39:05 +00:00
# srs: srs(simple rtmp server) over st(state-threads)
2015-03-07 08:37:29 +00:00
BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh
2015-04-20 08:25:48 +00:00
#
# srs_ingest_hls: to ingest hls stream to srs.
BUILD_KEY="srs_ingest_hls" APP_MAIN="srs_main_ingest_hls" APP_NAME="srs_ingest_hls" . auto/apps.sh
2015-03-07 08:39:05 +00:00
# add each modules for application
2015-03-31 10:06:55 +00:00
for SRS_MODULE in ${SRS_MODULES[*]}; do
2015-03-07 08:39:05 +00:00
. $SRS_MODULE/config
2015-03-31 10:06:55 +00:00
# no SRS_MODULE_MAIN
if [[ 0 -eq ${#SRS_MODULE_MAIN[@]} ]]; then continue; fi
2015-03-07 08:39:05 +00:00
BUILD_KEY="$SRS_MODULE_NAME" APP_MAIN="$SRS_MODULE_MAIN" APP_NAME="$SRS_MODULE_NAME" . auto/apps.sh
done
2015-03-07 08:37:29 +00:00
fi
# srs librtmp
if [ $SRS_LIBRTMP = YES ]; then
2015-05-24 10:56:52 +00:00
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${LIBS_OBJS[@]}"
2015-03-07 08:37:29 +00:00
BUILD_KEY="librtmp" LIB_NAME="lib/srs_librtmp" . auto/libs.sh
fi
#
# utest, the unit-test cases of srs, base on gtest1.6
if [ $SRS_UTEST = YES ]; then
MODULE_FILES=("srs_utest" "srs_utest_amf0" "srs_utest_protocol"
"srs_utest_kernel" "srs_utest_core" "srs_utest_config"
"srs_utest_reload")
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibSSLRoot})
2015-12-07 03:35:05 +00:00
ModuleLibFiles=(${LibSTfile} ${LibSSLfile})
2015-05-23 01:59:24 +00:00
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP")
2015-05-24 10:56:52 +00:00
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${APP_OBJS[@]}"
2015-03-07 08:37:29 +00:00
LINK_OPTIONS="-lpthread ${SrsLinkOptions}" MODULE_DIR="src/utest" APP_NAME="srs_utest" . auto/utest.sh
fi
2014-03-04 03:09:41 +00:00
#####################################################################################
2014-11-08 07:31:21 +00:00
# generate colorful summary script
. auto/summary.sh
2014-03-04 03:09:41 +00:00
#####################################################################################
2014-03-02 03:31:31 +00:00
# makefile
2016-12-07 04:09:39 +00:00
echo "Generate Makefile"
2015-03-07 08:39:05 +00:00
# backup old makefile.
rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk &&
mv ${SRS_WORKDIR}/${SRS_MAKEFILE} ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk
# generate phony header
2014-11-08 07:31:21 +00:00
cat << END > ${SRS_WORKDIR}/${SRS_MAKEFILE}
2015-04-20 08:25:48 +00:00
.PHONY: default _default install install-api help clean server srs_ingest_hls librtmp utest _prepare_dir $__mphonys
2014-03-22 14:07:14 +00:00
# install prefix.
SRS_PREFIX=${SRS_PREFIX}
2014-05-12 04:56:58 +00:00
__REAL_INSTALL=\$(DESTDIR)\$(SRS_PREFIX)
2014-03-02 01:00:49 +00:00
2014-03-17 03:52:23 +00:00
END
2014-05-04 10:38:08 +00:00
# embeded, ubuntu12, use embeded tool chain.
2015-09-23 02:27:57 +00:00
if [ $SRS_CROSS_BUILD = YES ]; then
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-03-17 03:52:23 +00:00
default:
\$(MAKE) GCC=${SrsArmGCC} CXX=${SrsArmCXX} AR=${SrsArmAR} LINK=${SrsArmCXX} _default
END
# x86/x64, use gnu-gcc/g++ tool chain.
else
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-03-17 03:52:23 +00:00
default:
\$(MAKE) _default
2014-03-02 01:00:49 +00:00
2014-03-17 03:52:23 +00:00
END
fi
2014-11-08 07:31:21 +00:00
# the real entry for all platform:
# the server, librtmp and utest
# where the bellow will check and disable some entry by only echo.
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2016-01-04 09:28:18 +00:00
_default: server srs_ingest_hls librtmp utest __modules $__mdefaults
2014-03-17 03:52:23 +00:00
@bash objs/_srs_build_summary.sh
2013-10-17 12:58:04 +00:00
help:
2016-12-07 04:09:39 +00:00
@echo "Usage: make <help>|<clean>|<server>|<librtmp>|<utest>|<install>|<install-api>|<uninstall>"
2015-03-07 08:39:05 +00:00
@echo " help display this help menu"
@echo " clean cleanup project"
@echo " server build the srs(simple rtmp server) over st(state-threads)"
@echo " librtmp build the client publish/play library, and samples"
@echo " utest build the utest for srs"
@echo " install install srs to the prefix path"
@echo " install-api install srs and api-server to the prefix path"
@echo " uninstall uninstall srs from prefix path"
@echo "@remark all modules will auto genearted and build"
@echo "For example:"
@echo " make"
@echo " make help"
2013-10-17 12:58:04 +00:00
clean:
2015-09-23 08:42:41 +00:00
(cd ${SRS_OBJS_DIR} && rm -rf srs srs_utest $__mcleanups)
(cd ${SRS_OBJS_DIR} && rm -rf src include lib)
(cd ${SRS_OBJS_DIR}/utest && rm -rf *.o *.a)
(cd research/librtmp && make clean)
(cd research/api-server/static-dir && rm -rf crossdomain.xml forward live players)
2013-10-17 12:58:04 +00:00
2014-11-08 07:31:21 +00:00
END
2016-01-04 09:28:18 +00:00
# for Makefile of all modules.
# depends on server, for some modules maybe use srs files.
echo "__modules: server" >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
for MMF in ${__makefiles[*]}; do
echo " \$(MAKE) -f $MMF" >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
done
echo "" >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-11-08 07:31:21 +00:00
# if export librtmp, donot build the srs server.
2014-11-08 10:33:15 +00:00
if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
server: _prepare_dir
2016-12-07 04:09:39 +00:00
@echo "Ingore srs(simple rtmp server) for srs-librtmp"
2014-11-08 07:31:21 +00:00
END
else
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2013-10-17 12:58:04 +00:00
server: _prepare_dir
2016-12-07 04:09:39 +00:00
@echo "Build the srs(simple rtmp server) over ST(state-threads)"
2014-11-08 08:07:31 +00:00
\$(MAKE) -f ${SRS_OBJS_DIR}/${SRS_MAKEFILE} srs
2013-10-17 12:58:04 +00:00
2014-03-07 11:07:38 +00:00
END
2014-11-08 07:31:21 +00:00
fi
2015-03-07 08:39:05 +00:00
# generate all modules entry
2015-03-31 10:06:55 +00:00
for SRS_MODULE in ${SRS_MODULES[*]}; do
2015-03-07 08:39:05 +00:00
. $SRS_MODULE/config
# if export librtmp, donot build the bravo-ingest.
if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
$SRS_MODULE_NAME: _prepare_dir
2016-12-07 04:09:39 +00:00
@echo "Ingore the $SRS_MODULE_NAME for srs-librtmp"
2015-03-07 08:39:05 +00:00
END
else
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
$SRS_MODULE_NAME: _prepare_dir
2016-12-07 04:09:39 +00:00
@echo "Build the $SRS_MODULE_NAME over SRS"
2015-03-07 08:39:05 +00:00
\$(MAKE) -f ${SRS_OBJS_DIR}/${SRS_MAKEFILE} $SRS_MODULE_NAME
END
fi
done
2014-11-08 07:31:21 +00:00
# disable install entry for srs-librtmp
2014-11-08 10:33:15 +00:00
if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
uninstall:
2016-12-07 04:09:39 +00:00
@echo "Disable uninstall for srs-librtmp"
2014-11-08 07:31:21 +00:00
install-api:
2016-12-07 04:09:39 +00:00
@echo "Disable install-api for srs-librtmp"
2014-03-07 11:07:38 +00:00
2014-11-08 07:31:21 +00:00
install:
2016-12-07 04:09:39 +00:00
@echo "Disable install for srs-librtmp"
2014-11-08 07:31:21 +00:00
END
else
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-03-22 14:07:14 +00:00
uninstall:
@echo "rmdir \$(SRS_PREFIX)"
@rm -rf \$(SRS_PREFIX)
2014-03-23 03:25:42 +00:00
install-api: install
2016-12-07 04:09:39 +00:00
@echo "Now mkdir \$(__REAL_INSTALL)"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)
2016-12-07 04:09:39 +00:00
@echo "Now copy binary files"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)/research/api-server
@cp research/api-server/server.py \$(__REAL_INSTALL)/research/api-server
@mkdir -p \$(__REAL_INSTALL)/objs/ffmpeg/bin
@cp objs/ffmpeg/bin/ffmpeg \$(__REAL_INSTALL)/objs/ffmpeg/bin
2016-12-07 04:09:39 +00:00
@echo "Now copy html files"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)/research/api-server/static-dir/players
@cp research/api-server/static-dir/crossdomain.xml \$(__REAL_INSTALL)/research/api-server/static-dir
@cp research/api-server/static-dir/index.html \$(__REAL_INSTALL)/research/api-server/static-dir
@cp -r research/api-server/static-dir/players/* \$(__REAL_INSTALL)/research/api-server/static-dir/players
2016-12-07 04:09:39 +00:00
@echo "Now copy init.d script files"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)/etc/init.d
@cp etc/init.d/srs-api \$(__REAL_INSTALL)/etc/init.d
@sed -i "s|^ROOT=.*|ROOT=\"\$(SRS_PREFIX)\"|g" \$(__REAL_INSTALL)/etc/init.d/srs-api
2014-03-23 03:25:42 +00:00
@echo ""
2016-12-07 04:09:39 +00:00
@echo "The api installed, to link and start api:"
2014-08-27 04:28:05 +00:00
@echo " sudo ln -sf \$(SRS_PREFIX)/etc/init.d/srs-api /etc/init.d/srs-api"
2014-03-23 03:25:42 +00:00
@echo " /etc/init.d/srs-api start"
2014-03-23 04:45:24 +00:00
@echo " http://\$(shell bash auto/local_ip.sh):8085"
2015-11-11 02:37:50 +00:00
@echo "@see: https://github.com/ossrs/srs/wiki/v1_CN_LinuxService"
2014-03-22 14:48:08 +00:00
2014-03-22 14:07:14 +00:00
install:
2016-12-07 04:09:39 +00:00
@echo "Now mkdir \$(__REAL_INSTALL)"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)
2016-12-07 04:09:39 +00:00
@echo "Now make the http root dir"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)/objs/nginx/html
@cp research/api-server/static-dir/crossdomain.xml \$(__REAL_INSTALL)/objs/nginx/html
2016-12-07 04:09:39 +00:00
@echo "Now copy binary files"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)/objs
@cp objs/srs \$(__REAL_INSTALL)/objs
2016-12-07 04:09:39 +00:00
@echo "Now copy srs conf files"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)/conf
@cp conf/*.conf \$(__REAL_INSTALL)/conf
2016-12-07 04:09:39 +00:00
@echo "Now copy init.d script files"
2014-05-12 04:56:58 +00:00
@mkdir -p \$(__REAL_INSTALL)/etc/init.d
@cp etc/init.d/srs \$(__REAL_INSTALL)/etc/init.d
@sed -i "s|^ROOT=.*|ROOT=\"\$(SRS_PREFIX)\"|g" \$(__REAL_INSTALL)/etc/init.d/srs
2014-03-23 03:25:42 +00:00
@echo ""
2016-12-07 04:09:39 +00:00
@echo "SRS is installed, to link and start srs:"
2014-08-27 04:28:05 +00:00
@echo " sudo ln -sf \$(SRS_PREFIX)/etc/init.d/srs /etc/init.d/srs"
2014-03-23 03:25:42 +00:00
@echo " /etc/init.d/srs start"
2015-11-11 02:37:50 +00:00
@echo "@see: https://github.com/ossrs/srs/wiki/v1_CN_LinuxService"
2014-03-22 14:07:14 +00:00
END
2014-11-08 07:31:21 +00:00
fi
2014-03-22 14:07:14 +00:00
2014-11-08 07:31:21 +00:00
# generate srs-librtmp entry
2014-03-07 10:55:15 +00:00
if [ $SRS_LIBRTMP = YES ]; then
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-03-04 04:45:41 +00:00
librtmp: server
2016-12-07 04:09:39 +00:00
@echo "Building the client publish/play library."
2014-11-08 08:07:31 +00:00
\$(MAKE) -f ${SRS_OBJS_DIR}/${SRS_MAKEFILE} librtmp
2016-12-07 04:09:39 +00:00
@echo "Building the srs-librtmp example."
2014-03-04 04:45:41 +00:00
(cd research/librtmp; \$(MAKE) ${SrsLibrtmpSampleEntry})
2014-03-01 16:05:59 +00:00
2014-03-07 10:55:15 +00:00
END
else
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-07-13 11:42:06 +00:00
librtmp: server
2016-12-07 04:09:39 +00:00
@echo "Ignore srs-librtmp for it's disabled."
2014-03-07 10:55:15 +00:00
END
fi
if [ $SRS_UTEST = YES ]; then
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-03-04 04:45:41 +00:00
utest: server
2016-12-07 04:09:39 +00:00
@echo "Building the utest for srs"
2014-03-03 10:28:50 +00:00
${SrsUtestMakeEntry}
2016-12-07 04:09:39 +00:00
@echo "The utest is built ok."
2014-03-03 10:28:50 +00:00
2014-03-07 10:55:15 +00:00
END
else
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2014-03-07 10:55:15 +00:00
utest: server
2016-12-07 04:09:39 +00:00
@echo "Ignore utest for it's disabled."
2014-03-07 10:55:15 +00:00
END
fi
2014-11-08 07:31:21 +00:00
cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
2013-10-17 12:58:04 +00:00
# the ./configure will generate it.
_prepare_dir:
2014-11-08 08:07:31 +00:00
@mkdir -p ${SRS_OBJS_DIR}
2013-10-17 12:58:04 +00:00
END
2015-03-07 08:39:05 +00:00
# generate makefile ok, append the tails.
cat ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk >> ${SRS_WORKDIR}/${SRS_MAKEFILE} &&
rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk
2016-12-07 04:09:39 +00:00
echo 'Configure ok! '
2013-10-17 12:58:04 +00:00
2014-02-28 13:07:46 +00:00
#####################################################################################
# when configure success, prepare build
#####################################################################################
# create objs/logs for ffmpeg to write log.
2014-11-08 10:33:15 +00:00
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
2014-11-08 08:45:50 +00:00
mkdir -p ${SRS_OBJS}/logs
fi
2014-02-28 13:07:46 +00:00
2014-02-28 07:10:28 +00:00
#####################################################################################
# configure summary
#####################################################################################
2013-11-30 06:12:19 +00:00
# summary
2014-11-08 10:33:15 +00:00
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
echo ""
2016-12-07 04:09:39 +00:00
echo "Configure summary:"
echo " ${SRS_AUTO_USER_CONFIGURE}"
2014-11-08 10:33:15 +00:00
echo " ${SRS_AUTO_CONFIGURE}"
if [ $SRS_HLS = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}HLS is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: HLS is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
2015-08-18 09:43:01 +00:00
if [ $SRS_STREAM_CASTER = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Experiment: StreamCaster is enabled.${BLACK}"
2015-08-18 09:43:01 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: StreamCaster is disabled.${BLACK}"
2015-08-18 09:43:01 +00:00
fi
2015-09-22 09:40:05 +00:00
if [ $SRS_KAFKA = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Kafka is enabled.${BLACK}"
2015-09-22 09:40:05 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: Kafka is disabled.${BLACK}"
2015-09-22 09:40:05 +00:00
fi
2015-03-12 03:15:15 +00:00
if [ $SRS_HDS = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Experiment: HDS is enabled.${BLACK}"
2015-03-12 03:15:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Warning: HDS is disabled.${BLACK}"
2015-03-12 03:15:15 +00:00
fi
2014-11-08 10:33:15 +00:00
if [ $SRS_NGINX = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Nginx is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: Nginx is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_DVR = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}DVR is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: DVR is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_SSL = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}RTMP complex handshake is enabled${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: RTMP complex handshake is disabled, flash cann't play h264/aac.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_FFMPEG_TOOL = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The FFMPEG tool is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: The FFMPEG tool is disabled, please use other tools for transcode/mux/ingest.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_TRANSCODE = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The transcoding is enabled${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: The transcoding is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_INGEST = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The ingesting is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: The ingesting is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_HTTP_CALLBACK = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The http-callback is enabled${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: The http-callback is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_HTTP_SERVER = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Embeded HTTP server for HTTP-FLV/HLS is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: Embeded HTTP server is disabled, HTTP-FLV is disabled, please use nginx to delivery HLS.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_HTTP_API = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The HTTP API is enabled${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Warning: The HTTP API is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_LIBRTMP = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The client-side srs-librtmp is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Note: The client-side srs-librtmp is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_RESEARCH = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The research tools are enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The research tools are disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_UTEST = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The utests are enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}Note: The utests are disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_GPERF = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The gperf(tcmalloc) is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The gperf(tcmalloc) is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_GPERF_MC = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}The gmc(gperf memory check) is enabled, performance may suffer.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The gmc(gperf memory check) is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
2016-01-08 05:58:19 +00:00
if [ $SRS_GPERF_MD = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}The gmd(gperf memory defense) is enabled, performance may suffer.${BLACK}"
2016-01-08 05:58:19 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The gmd(gperf memory defense) is disabled.${BLACK}"
2016-01-08 05:58:19 +00:00
fi
2014-11-08 10:33:15 +00:00
if [ $SRS_GPERF_MP = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}The gmp(gperf memory profile) is enabled, performance may suffer.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The gmp(gperf memory profile) is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_GPERF_CP = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}The gcp(gperf cpu profile) is enabled, performance may suffer.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The gcp(gperf cpu profile) is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_GPROF = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${YELLOW}The gprof(GNU profile tool) is enabled, performance may suffer.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The gprof(GNU profile tool) is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_ARM_UBUNTU12 = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The cross-build arm-ubuntu12(armhf, v7cpu) is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The cross-build arm-ubuntu12(armhf, v7cpu)is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
if [ $SRS_MIPS_UBUNTU12 = YES ]; then
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}The mips-ubuntu12 is enabled.${BLACK}"
2014-11-08 10:33:15 +00:00
else
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Note: The mips-ubuntu12 is disabled.${BLACK}"
2014-11-08 10:33:15 +00:00
fi
2015-03-07 08:39:05 +00:00
# add each modules for application
2015-03-31 10:06:55 +00:00
for SRS_MODULE in ${SRS_MODULES[*]}; do
2016-12-07 04:09:39 +00:00
echo -e "${GREEN}Enable module: $SRS_MODULE${BLACK}"
2015-03-07 08:39:05 +00:00
done
2014-05-04 10:38:08 +00:00
fi
2013-11-30 06:12:19 +00:00
2014-02-28 07:10:28 +00:00
#####################################################################################
# next step
#####################################################################################
2014-11-08 10:33:15 +00:00
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
ip=`ifconfig|grep "inet addr"| grep -v "127.0.0.1"|awk '{print $2}'|awk -F ':' 'NR==1 {print $2}'`
echo ""
2016-12-07 04:09:39 +00:00
echo "You can run 3rdparty applications:"
2014-11-08 10:33:15 +00:00
if [ $SRS_NGINX = YES ]; then
echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls"
fi
if [ $SRS_FFMPEG_TOOL = YES ]; then
echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding"
fi
if [ $SRS_HTTP_CALLBACK = YES ]; then
echo -e "\" python ./research/api-server/server.py 8085 \" to start the api-server"
fi
echo ""
2016-12-07 04:09:39 +00:00
echo "You can build SRS:"
2014-11-08 10:33:15 +00:00
echo "\" make \" to build the srs(simple rtmp server)."
echo "\" make help \" to get the usage of make"
2014-11-08 12:06:31 +00:00
else
# for srs-librtmp single file,
# package the whole project to srs_librtmp.h and srs_librtmp.cpp
if [ $SRS_EXPORT_LIBRTMP_SINGLE != NO ]; then
2016-12-07 04:09:39 +00:00
echo "Packaging the whole project to srs_librtmp.h and srs_librtmp.cpp"
2014-11-08 12:06:31 +00:00
. $SRS_EXPORT_LIBRTMP_SINGLE/auto/generate-srs-librtmp-single.sh
echo -e "${GREEN}Please use the srs-librtmp files: ${BLACK}"
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.h ${BLACK}"
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.cpp ${BLACK}"
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/example.c ${BLACK}"
2014-11-16 03:29:50 +00:00
echo -e "${GREEN}To compile the example: ${BLACK}"
echo -e "${GREEN} cd $SRS_EXPORT_LIBRTMP_PROJECT && $SRS_SINGLE_LIBRTMP_COMPILE ${BLACK}"
2014-11-08 12:06:31 +00:00
# for srs-librtmp project.
else
echo -e "${GREEN}Please use the srs-librtmp project: ${BLACK}"
echo -e "${GREEN} cd $SRS_EXPORT_LIBRTMP_PROJECT && make ${BLACK}"
fi
2013-12-07 12:34:42 +00:00
fi