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
2013-11-27 14:41:58 +00:00
SRS_OBJS="objs"
mkdir -p ${SRS_OBJS}
2013-10-17 12:58:04 +00:00
2014-03-04 03:09:41 +00:00
#####################################################################################
# linux shell color support.
RED="\\e[31m"
GREEN="\\e[32m"
YELLOW="\\e[33m"
BLACK="\\e[0m"
2014-02-28 05:17:31 +00:00
#####################################################################################
2014-03-04 05:03:20 +00:00
# parse user options, set the variables like:
2014-04-08 07:28:34 +00:00
# srs features: SRS_SSL/SRS_HLS/SRS_NGINX/SRS_FFMPEG_TOOL/SRS_HTTP_CALLBACK/......
2014-03-04 05:03:20 +00:00
# build options: SRS_JOBS
2014-02-28 05:17:31 +00:00
#####################################################################################
2014-03-19 02:51:33 +00:00
SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp"
2014-02-28 05:17:31 +00:00
# parse options, exit with error when parse options invalid.
2013-11-28 14:28:34 +00:00
. auto/options.sh
2013-11-27 14:41:58 +00:00
# clean the exists
2014-02-28 05:17:31 +00:00
# do this only when the options is ok.
2013-11-27 14:41:58 +00:00
if [[ -f Makefile ]]; then
make clean
2013-11-26 08:45:50 +00:00
fi
2014-02-28 05:17:31 +00:00
# write user options to headers
2014-03-20 06:23:36 +00:00
echo "// auto generated by configure" > $SRS_AUTO_HEADERS_H
2014-03-19 03:24:25 +00:00
echo "#ifndef SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H
echo "" >> $SRS_AUTO_HEADERS_H
2014-04-15 06:01:57 +00:00
echo "#define SRS_AUTO_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_AUTO_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_AUTO_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H
2014-04-15 08:07:25 +00:00
echo "#define SRS_AUTO_USER_CONFIGURE \"${SRS_AUTO_USER_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H
2014-04-15 06:01:57 +00:00
echo "#define SRS_AUTO_CONFIGURE \"${SRS_AUTO_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H
2014-03-19 02:51:33 +00:00
# new empty line to auto headers file.
echo "" >> $SRS_AUTO_HEADERS_H
2013-11-27 14:41:58 +00:00
2014-03-19 02:51:33 +00:00
#####################################################################################
# generate auto headers file, depends on the finished of options.sh
#####################################################################################
2014-05-04 10:38:08 +00:00
if [ $SRS_ARM_UBUNTU12 = YES ]; then
__SrsArmCC="arm-linux-gnueabi-gcc";
__SrsArmGCC="arm-linux-gnueabi-gcc";
__SrsArmCXX="arm-linux-gnueabi-g++";
__SrsArmAR="arm-linux-gnueabi-ar";
__SrsArmLD="arm-linux-gnueabi-ld";
__SrsArmRANDLIB="arm-linux-gnueabi-ranlib";
fi
2014-05-04 10:38:42 +00:00
if [ $SRS_MIPS_UBUNTU12 = YES ]; then
2014-05-04 10:38:08 +00:00
__SrsArmCC="mipsel-openwrt-linux-gcc";
__SrsArmGCC="mipsel-openwrt-linux-gcc";
__SrsArmCXX="mipsel-openwrt-linux-g++";
__SrsArmAR="mipsel-openwrt-linux-ar";
__SrsArmLD="mipsel-openwrt-linux-ld";
__SrsArmRANDLIB="mipsel-openwrt-linux-ranlib";
fi
2014-03-16 12:16:42 +00:00
# the arm-ubuntu12 options for make for depends
2014-05-04 10:52:32 +00:00
if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi
if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi
if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi
if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi
if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi
if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi
2014-05-04 10:38:08 +00:00
# write to source file
if [ $SRS_EMBEDED_CPU = YES ]; then
echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB"
echo "#define SRS_AUTO_EMBEDED_TOOL_CHAIN \"cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB\"" >> $SRS_AUTO_HEADERS_H
else
echo "#define SRS_AUTO_EMBEDED_TOOL_CHAIN \"normal x86/x64 gcc\"" >> $SRS_AUTO_HEADERS_H
fi
2014-03-25 06:36:30 +00:00
echo "" >> $SRS_AUTO_HEADERS_H
2014-03-16 12:16:42 +00:00
2013-11-27 14:41:58 +00:00
# apply user options.
. auto/depends.sh
2014-03-19 03:24:25 +00:00
# auto header EOF.
echo "#endif" >> $SRS_AUTO_HEADERS_H
echo "" >> $SRS_AUTO_HEADERS_H
2013-10-17 12:58:04 +00:00
#####################################################################################
# generate Makefile.
#####################################################################################
2014-03-04 08:13:12 +00:00
SRS_MAKEFILE="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-02-28 07:42:35 +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-03-04 10:46:00 +00:00
if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE))"; fi
2014-03-03 10:28:50 +00:00
2014-03-04 03:09:41 +00:00
#####################################################################################
# colorful summary
2014-03-15 11:44:06 +00:00
SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi
2014-04-15 06:01:57 +00:00
SrsDvrSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_DVR = YES ]; then SrsDvrSummaryColor="\${GREEN}"; fi
2014-04-06 12:30:51 +00:00
SrsNginxSummaryColor="\${GREEN}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi
2014-03-15 11:44:06 +00:00
SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi
2014-04-08 07:28:34 +00:00
SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG_TOOL = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi
2014-04-06 12:30:51 +00:00
SrsTranscodeSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_TRANSCODE = YES ]; then SrsTranscodeSummaryColor="\${GREEN}"; fi
2014-04-06 13:05:18 +00:00
SrsIngestSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_INGEST = YES ]; then SrsIngestSummaryColor="\${GREEN}"; fi
2014-03-15 11:44:06 +00:00
SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi
2014-04-01 07:33:09 +00:00
SrsHttpServerSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi
2014-04-01 08:06:32 +00:00
SrsHttpApiSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_API = YES ]; then SrsHttpApiSummaryColor="\${GREEN}"; fi
2014-03-15 11:44:06 +00:00
SrsLibrtmpSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\${GREEN}"; fi
SrsLibrtmpSSLSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\${GREEN}"; fi fi
SrsBWTCSummaryColor="\${GREEN}{disabled} "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\${GREEN}"; fi
SrsResearchSummaryColor="\${GREEN}{disabled} "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\${GREEN}"; fi
SrsUtestSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\${GREEN}"; fi
SrsGperfSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF = YES ]; then SrsGperfSummaryColor="\${GREEN}"; fi
SrsGperfMCSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF_MC = YES ]; then SrsGperfMCSummaryColor="\${YELLOW}"; fi
SrsGperfMPSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF_MP = YES ]; then SrsGperfMPSummaryColor="\${YELLOW}"; fi
SrsGperfCPSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF_CP = YES ]; then SrsGperfCPSummaryColor="\${YELLOW}"; fi
SrsGprofSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPROF = YES ]; then SrsGprofSummaryColor="\${YELLOW}"; fi
cat <<END > ${SRS_OBJS}/${SRS_BUILD_SUMMARY}
#!/bin/bash
#####################################################################################
# linux shell color support.
RED="\\${RED}"
GREEN="\\${GREEN}"
YELLOW="\\${YELLOW}"
BLACK="\\${BLACK}"
echo -e "\${GREEN}build summary:\${BLACK}"
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
echo -e " |${SrsGperfSummaryColor}gperf @see: https://github.com/winlinvip/simple-rtmp-server/wiki/GPERF\${BLACK}"
echo -e " | ${SrsGperfMCSummaryColor}gmc @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\${BLACK}"
echo -e " | ${SrsGperfMCSummaryColor}gmc: gperf memory check\${BLACK}"
echo -e " | ${SrsGperfMCSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/srs.conf # start gmc\${BLACK}"
echo -e " | ${SrsGperfMCSummaryColor}killall -2 srs # or CTRL+C to stop gmc\${BLACK}"
echo -e " | ${SrsGperfMPSummaryColor}gmp @see: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html\${BLACK}"
echo -e " | ${SrsGperfMPSummaryColor}gmp: gperf memory profile\${BLACK}"
echo -e " | ${SrsGperfMPSummaryColor}rm -f gperf.srs.gmp*; ./objs/srs -c conf/srs.conf # start gmp\${BLACK}"
echo -e " | ${SrsGperfMPSummaryColor}killall -2 srs # or CTRL+C to stop gmp\${BLACK}"
echo -e " | ${SrsGperfMPSummaryColor}./objs/pprof --text objs/srs gperf.srs.gmp* # to analysis memory profile\${BLACK}"
echo -e " | ${SrsGperfCPSummaryColor}gcp @see: http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html\${BLACK}"
echo -e " | ${SrsGperfCPSummaryColor}gcp: gperf cpu profile\${BLACK}"
echo -e " | ${SrsGperfCPSummaryColor}rm -f gperf.srs.gcp*; ./objs/srs -c conf/srs.conf # start gcp\${BLACK}"
echo -e " | ${SrsGperfCPSummaryColor}killall -2 srs # or CTRL+C to stop gcp\${BLACK}"
echo -e " | ${SrsGperfCPSummaryColor}./objs/pprof --text objs/srs gperf.srs.gcp* # to analysis cpu profile\${BLACK}"
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
echo -e " |${SrsGprofSummaryColor}gprof @see: https://github.com/winlinvip/simple-rtmp-server/wiki/GPROF\${BLACK}"
echo -e " |${SrsGprofSummaryColor}gprof: GNU profile tool, @see: http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html\${BLACK}"
echo -e " | ${SrsGprofSummaryColor}rm -f gmon.out; ./objs/srs -c conf/srs.conf # start gprof\${BLACK}"
echo -e " | ${SrsGprofSummaryColor}killall -2 srs # or CTRL+C to stop gprof\${BLACK}"
echo -e " | ${SrsGprofSummaryColor}gprof -b ./objs/srs gmon.out > gprof.srs.log && rm -f gmon.out # gprof report to gprof.srs.log\${BLACK}"
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
echo -e " |${SrsResearchSummaryColor}research: ./objs/research, api server, players, ts info.\${BLACK}"
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
echo -e " |${SrsBWTCSummaryColor}bandwidth: ./objs/bandwidth, the bandwidth test client\${BLACK}"
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
2014-03-23 04:21:36 +00:00
echo -e " |${SrsUtestSummaryColor}utest: ./objs/srs_utest, the utest for srs\${BLACK}"
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
2014-03-15 11:44:06 +00:00
echo -e " |${SrsLibrtmpSummaryColor}librtmp @see: https://github.com/winlinvip/simple-rtmp-server/wiki/SrsLibrtmp\${BLACK}"
echo -e " |${SrsLibrtmpSummaryColor}librtmp: ./objs/include, ./objs/lib, the srs-librtmp library\${BLACK}"
echo -e " | ${SrsLibrtmpSummaryColor}simple handshake: publish/play stream with simple handshake to server\${BLACK}"
echo -e " | ${SrsLibrtmpSSLSummaryColor}complex handshake: it's not required for client, recommend disable it\${BLACK}"
echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp, the srs-librtmp client sample\${BLACK}"
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
2014-03-18 05:04:06 +00:00
echo -e " |\${GREEN}server: ./objs/srs -c conf/srs.conf, start the srs server\${BLACK}"
2014-03-15 11:44:06 +00:00
echo -e " | ${SrsHlsSummaryColor}hls @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}"
2014-03-20 06:08:53 +00:00
echo -e " | ${SrsHlsSummaryColor}hls: generate m3u8 and ts from rtmp stream\${BLACK}"
2014-04-15 06:01:57 +00:00
echo -e " | ${SrsDvrSummaryColor}dvr @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DVR\${BLACK}"
echo -e " | ${SrsDvrSummaryColor}dvr: record RTMP stream to flv files.\${BLACK}"
2014-03-20 06:08:53 +00:00
echo -e " | ${SrsNginxSummaryColor}nginx @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}"
echo -e " | ${SrsNginxSummaryColor}nginx: delivery HLS stream by nginx\${BLACK}"
2014-03-15 11:44:06 +00:00
echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\${BLACK}"
echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\${BLACK}"
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}"
2014-04-06 12:30:51 +00:00
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: transcode, mux, ingest tool\${BLACK}"
echo -e " | ${SrsTranscodeSummaryColor}transcode @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}"
echo -e " | ${SrsTranscodeSummaryColor}transcode: support transcoding RTMP stream\${BLACK}"
2014-04-06 13:05:18 +00:00
echo -e " | ${SrsIngestSummaryColor}ingest @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Ingest\${BLACK}"
echo -e " | ${SrsIngestSummaryColor}ingest: support ingest file/stream/device then push to SRS by RTMP stream\${BLACK}"
2014-04-01 07:33:09 +00:00
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPCallback\${BLACK}"
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback: support http callback for authentication and event injection\${BLACK}"
echo -e " | ${SrsHttpServerSummaryColor}http-server @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPServer\${BLACK}"
echo -e " | ${SrsHttpServerSummaryColor}http-server: support http server to delivery http stream\${BLACK}"
2014-04-01 08:06:32 +00:00
echo -e " | ${SrsHttpApiSummaryColor}http-api @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPApi\${BLACK}"
echo -e " | ${SrsHttpApiSummaryColor}http-api: support http api to manage server\${BLACK}"
2014-03-15 11:44:06 +00:00
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
echo -e "\${GREEN}binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\${BLACK}"
END
2014-03-04 03:09:41 +00:00
#####################################################################################
2014-03-02 03:31:31 +00:00
# makefile
2014-02-28 07:42:35 +00:00
echo "generate Makefile"
2013-11-27 14:41:58 +00:00
cat << END > ${SRS_MAKEFILE}
2014-03-23 03:25:42 +00:00
.PHONY: default _default install install-api help clean server bandwidth librtmp librtmp-sample utest _prepare_dir
2014-03-22 14:07:14 +00:00
# install prefix.
SRS_PREFIX=${SRS_PREFIX}
2014-03-23 14:52:08 +00:00
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.
if [ $SRS_EMBEDED_CPU = YES ]; then
2014-03-17 03:52:23 +00:00
cat << END >> ${SRS_MAKEFILE}
default:
\$(MAKE) GCC=${SrsArmGCC} CXX=${SrsArmCXX} AR=${SrsArmAR} LINK=${SrsArmCXX} _default
END
# x86/x64, use gnu-gcc/g++ tool chain.
else
cat << END >> ${SRS_MAKEFILE}
default:
\$(MAKE) _default
2014-03-02 01:00:49 +00:00
2014-03-17 03:52:23 +00:00
END
fi
# the real entry for all platform.
cat << END >> ${SRS_MAKEFILE}
_default: bandwidth librtmp-sample utest
@bash objs/_srs_build_summary.sh
2013-10-17 12:58:04 +00:00
help:
2014-03-23 03:25:42 +00:00
@echo "Usage: make <help>|<clean>|<server>|<bandwidth>|<librtmp>|<librtmp-sample>|<utest>|<install>|<install-api>|<uninstall>"
2014-03-01 16:05:59 +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 " bandwidth build the bandwidth test client tool."
@echo " librtmp build the client publish/play library."
@echo " librtmp-sample build the srs-librtmp sample"
2014-03-03 10:28:50 +00:00
@echo " utest build the utest for srs"
2014-03-22 14:07:14 +00:00
@echo " install install srs to the prefix path"
2014-03-23 03:25:42 +00:00
@echo " install-api install srs api to the prefix path"
2014-03-22 14:07:14 +00:00
@echo " uninstall uninstall srs from prefix path"
2013-10-17 12:58:04 +00:00
clean:
2014-04-01 04:36:56 +00:00
(cd ${SRS_OBJS}; rm -rf srs bandwidth srs_utest)
(cd ${SRS_OBJS}; rm -rf src research include lib)
(cd ${SRS_OBJS}/utest; rm -rf *.o *.a)
2014-03-01 16:05:59 +00:00
(cd research/librtmp; make clean)
2014-03-24 10:07:32 +00:00
(cd research/api-server/static-dir; rm -rf crossdomain.xml forward live players)
2013-10-17 12:58:04 +00:00
server: _prepare_dir
@echo "build the srs(simple rtmp server) over st(state-threads)"
2013-12-15 04:44:09 +00:00
\$(MAKE) -f ${SRS_OBJS}/${SRS_MAKEFILE} srs
2013-10-17 12:58:04 +00:00
2014-03-07 11:07:38 +00:00
END
2014-03-22 14:07:14 +00:00
# install entry
cat << END >> ${SRS_MAKEFILE}
uninstall:
@echo "rmdir \$(SRS_PREFIX)"
@rm -rf \$(SRS_PREFIX)
2014-03-23 03:25:42 +00:00
install-api: install
2014-03-23 14:52:08 +00:00
@echo "mkdir \$(DESTDIR)"
@mkdir -p \$(DESTDIR)
2014-03-22 14:48:08 +00:00
@echo "copy binary files"
2014-03-23 14:52:08 +00:00
@mkdir -p \$(DESTDIR)/research/api-server
@cp research/api-server/server.py \$(DESTDIR)/research/api-server
@mkdir -p \$(DESTDIR)/objs/ffmpeg/bin
@cp objs/ffmpeg/bin/ffmpeg \$(DESTDIR)/objs/ffmpeg/bin
2014-03-22 14:48:08 +00:00
@echo "copy html files"
2014-03-23 14:52:08 +00:00
@mkdir -p \$(DESTDIR)/research/api-server/static-dir/players
@cp research/api-server/static-dir/crossdomain.xml \$(DESTDIR)/research/api-server/static-dir
@cp research/api-server/static-dir/index.html \$(DESTDIR)/research/api-server/static-dir
@cp -r research/api-server/static-dir/players/* \$(DESTDIR)/research/api-server/static-dir/players
2014-03-22 14:48:08 +00:00
@echo "copy init.d script files"
2014-03-23 14:52:08 +00:00
@mkdir -p \$(DESTDIR)/etc/init.d
@cp etc/init.d/srs-api \$(DESTDIR)/etc/init.d
@sed -i "s|^ROOT=.*|ROOT=\"\$(SRS_PREFIX)\"|g" \$(DESTDIR)/etc/init.d/srs-api
2014-03-23 03:25:42 +00:00
@echo ""
@echo "api installed, to link and start api:"
@echo " sudo ln -sf /usr/local/srs/etc/init.d/srs-api /etc/init.d/srs-api"
@echo " /etc/init.d/srs-api start"
2014-03-23 04:45:24 +00:00
@echo " http://\$(shell bash auto/local_ip.sh):8085"
2014-03-23 03:25:42 +00:00
@echo "@see: https://github.com/winlinvip/simple-rtmp-server/wiki/LinuxService"
2014-03-22 14:48:08 +00:00
2014-03-22 14:07:14 +00:00
install:
2014-03-23 14:52:08 +00:00
@echo "mkdir \$(DESTDIR)"
@mkdir -p \$(DESTDIR)
2014-04-05 06:17:49 +00:00
@echo "make the http root dir"
@mkdir -p \$(DESTDIR)/objs/nginx/html
2014-03-22 14:07:14 +00:00
@echo "copy binary files"
2014-03-23 14:52:08 +00:00
@mkdir -p \$(DESTDIR)/objs
@cp objs/srs \$(DESTDIR)/objs
2014-03-22 14:07:14 +00:00
@echo "copy srs conf files"
2014-03-23 14:52:08 +00:00
@mkdir -p \$(DESTDIR)/conf
@cp conf/*.conf \$(DESTDIR)/conf
2014-03-22 14:07:14 +00:00
@echo "copy init.d script files"
2014-03-23 14:52:08 +00:00
@mkdir -p \$(DESTDIR)/etc/init.d
@cp etc/init.d/srs \$(DESTDIR)/etc/init.d
@sed -i "s|^ROOT=.*|ROOT=\"\$(SRS_PREFIX)\"|g" \$(DESTDIR)/etc/init.d/srs
2014-03-23 03:25:42 +00:00
@echo ""
@echo "srs installed, to link and start srs:"
@echo " sudo ln -sf /usr/local/srs/etc/init.d/srs /etc/init.d/srs"
@echo " /etc/init.d/srs start"
@echo "@see: https://github.com/winlinvip/simple-rtmp-server/wiki/LinuxService"
2014-03-22 14:07:14 +00:00
END
2014-03-07 11:07:38 +00:00
if [ $SRS_BWTC = YES ]; then
cat << END >> ${SRS_MAKEFILE}
2014-03-04 04:45:41 +00:00
bandwidth: server
2013-12-27 09:03:12 +00:00
@echo "build the bandwidth test client tool"
\$(MAKE) -f ${SRS_OBJS}/${SRS_MAKEFILE} bandwidth
2014-03-07 10:55:15 +00:00
END
2014-03-07 11:07:38 +00:00
else
cat << END >> ${SRS_MAKEFILE}
bandwidth: server
@echo "bandwidth test client tool is disabled, ignore."
END
fi
2014-03-07 10:55:15 +00:00
if [ $SRS_LIBRTMP = YES ]; then
cat << END >> ${SRS_MAKEFILE}
2014-03-04 04:45:41 +00:00
librtmp: server
2014-03-01 11:15:36 +00:00
@echo "build the client publish/play library."
\$(MAKE) -f ${SRS_OBJS}/${SRS_MAKEFILE} librtmp
2014-03-16 12:20:29 +00:00
END
else
cat << END >> ${SRS_MAKEFILE}
librtmp: server
@echo "srs-librtmp is disabled, ignore."
END
fi
2014-03-17 03:52:23 +00:00
if [ $SRS_LIBRTMP = YES ]; then
2014-03-16 12:20:29 +00:00
cat << END >> ${SRS_MAKEFILE}
2014-03-04 04:45:41 +00:00
librtmp-sample: librtmp
2014-03-01 16:05:59 +00:00
@echo "build the srs-librtmp sample"
2014-03-04 04:45:41 +00:00
(cd research/librtmp; \$(MAKE) ${SrsLibrtmpSampleEntry})
2014-03-01 16:05:59 +00:00
@echo "srs-librtmp sample build success"
2014-03-07 10:55:15 +00:00
END
else
cat << END >> ${SRS_MAKEFILE}
librtmp-sample: librtmp
@echo "srs-librtmp sample is disabled, ignore."
END
fi
if [ $SRS_UTEST = YES ]; then
cat << END >> ${SRS_MAKEFILE}
2014-03-04 04:45:41 +00:00
utest: server
2014-03-03 10:28:50 +00:00
@echo "build the utest for srs"
${SrsUtestMakeEntry}
@echo "utest for srs build success"
2014-03-07 10:55:15 +00:00
END
else
cat << END >> ${SRS_MAKEFILE}
utest: server
@echo "utest is disabled, ignore"
END
fi
cat << END >> ${SRS_MAKEFILE}
2013-10-17 12:58:04 +00:00
# the ./configure will generate it.
_prepare_dir:
2013-11-27 14:41:58 +00:00
@mkdir -p ${SRS_OBJS}
2013-10-17 12:58:04 +00:00
END
2014-02-28 07:42:35 +00:00
#####################################################################################
# build tools or compiler args.
2013-10-17 12:58:04 +00:00
# enable gdb debug
2014-03-07 09:18:31 +00:00
GDBDebug=" -g -O0"
2013-10-17 12:58:04 +00:00
# the warning level.
2014-03-07 09:18:31 +00:00
WarnLevel=" -Wall"
2013-10-17 12:58:04 +00:00
# the compile standard.
2013-11-10 03:52:19 +00:00
CppStd="-ansi"
2014-03-01 15:24:53 +00:00
# for library compile
2014-03-07 09:18:31 +00:00
LibraryCompile=" -fPIC"
# 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
2013-10-17 12:58:04 +00:00
# the cxx flag generated.
2014-03-07 09:18:31 +00:00
CXXFLAGS="${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}"
2014-03-06 10:12:19 +00:00
if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi
2014-03-17 03:52:23 +00:00
cat << END > ${SRS_OBJS}/${SRS_MAKEFILE}
2014-03-16 12:16:42 +00:00
GCC = gcc
CXX = g++
AR = ar
LINK = g++
2014-02-28 16:17:41 +00:00
CXXFLAGS = ${CXXFLAGS}
2013-10-17 12:58:04 +00:00
2014-03-04 04:45:41 +00:00
.PHONY: default srs bandwidth librtmp
2013-10-17 12:58:04 +00:00
default:
END
2014-02-28 07:42:35 +00:00
#####################################################################################
# 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.
2014-03-04 06:01:43 +00:00
LibSTRoot="${SRS_OBJS}/st"; LibSTfile="${LibSTRoot}/libst.a"
2014-02-28 07:42:35 +00:00
# hp(http-parser) the http request/url parser, for SRS to support HTTP callback.
2014-03-04 06:01:43 +00:00
LibHttpParserRoot=""; LibHttpParserfile=""
2014-04-01 07:33:09 +00:00
if [ $SRS_HTTP_PARSER = YES ]; then LibHttpParserRoot="${SRS_OBJS}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi
2014-02-28 14:50:18 +00:00
# openssl-1.0.1f, for the RTMP complex handshake.
2014-03-04 06:01:43 +00:00
LibSSLRoot="";LibSSLfile=""
2014-04-16 06:27:34 +00:00
if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = NO ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile="${SRS_OBJS}/openssl/lib/libssl.a ${SRS_OBJS}/openssl/lib/libcrypto.a"; fi fi
2014-03-06 10:12:19 +00:00
# gperftools-2.1, for mem check and mem/cpu profile
LibGperfRoot=""; LibGperfFile=""
if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS}/gperf/include"; LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_and_profiler.a"; fi
2014-03-19 04:18:48 +00:00
# the link options, always use static link
2014-05-04 10:38:08 +00:00
SrsLinkOptions="-ldl";
if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lssl"; fi fi
# 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 = NO ]; then SrsLinkOptions="${SrsLinkOptions} -lgcc_eh"; fi
2013-10-17 12:58:04 +00:00
2014-02-28 07:42:35 +00:00
#####################################################################################
# Modules, compile each module, then link to binary
#
2014-03-01 02:30:16 +00:00
#Core, depends only on system apis.
2014-03-04 06:01:43 +00:00
MODULE_ID="CORE"
MODULE_DEPENDS=()
2014-03-01 02:14:25 +00:00
ModuleLibIncs=(${SRS_OBJS})
2014-03-01 02:19:11 +00:00
MODULE_FILES=("srs_core" "srs_core_autofree")
2014-03-04 10:46:00 +00:00
CORE_INCS="src/core"; MODULE_DIR=${CORE_INCS} . auto/modules.sh
2014-03-01 02:05:14 +00:00
CORE_OBJS="${MODULE_OBJS[@]}"
#
2014-03-01 02:30:16 +00:00
#Kernel, depends on core, provides error/log/config, nothing about stream information.
MODULE_ID="KERNEL"
MODULE_DEPENDS=("CORE")
ModuleLibIncs=(${SRS_OBJS})
2014-03-21 09:56:27 +00:00
MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_stream" "srs_kernel_buffer" "srs_kernel_utility")
2014-03-04 10:46:00 +00:00
KERNEL_INCS="src/kernel"; MODULE_DIR=${KERNEL_INCS} . auto/modules.sh
2014-03-01 02:30:16 +00:00
KERNEL_OBJS="${MODULE_OBJS[@]}"
#
2014-03-01 06:05:58 +00:00
#RTMP Protocol, depends on core/kernel, provides rtmp/htttp protocol features.
MODULE_ID="RTMP"
2014-03-01 03:24:40 +00:00
MODULE_DEPENDS=("CORE" "KERNEL")
2014-03-01 06:03:02 +00:00
ModuleLibIncs=(${SRS_OBJS} ${LibSSLRoot})
MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_protocol_rtmp_stack" "srs_protocol_rtmp"
2014-03-01 07:59:55 +00:00
"srs_protocol_handshake" "srs_protocol_utility")
2014-03-04 10:46:00 +00:00
RTMP_INCS="src/rtmp"; MODULE_DIR=${RTMP_INCS} . auto/modules.sh
2014-03-01 06:05:58 +00:00
RTMP_OBJS="${MODULE_OBJS[@]}"
2014-03-01 03:24:40 +00:00
#
2014-03-01 02:05:14 +00:00
#App Module
MODULE_ID="APP"
2014-03-01 06:05:58 +00:00
MODULE_DEPENDS=("CORE" "KERNEL" "RTMP")
2014-03-01 06:03:02 +00:00
ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${SRS_OBJS})
2014-03-27 04:14:04 +00:00
MODULE_FILES=("srs_app_server" "srs_app_conn" "srs_app_rtmp_conn" "srs_app_socket" "srs_app_source"
2014-03-02 13:49:09 +00:00
"srs_app_codec" "srs_app_refer" "srs_app_hls" "srs_app_forward" "srs_app_encoder"
"srs_app_http" "srs_app_thread" "srs_app_bandwidth" "srs_app_st" "srs_app_log"
2014-03-27 04:14:04 +00:00
"srs_app_config" "srs_app_pithy_print" "srs_app_reload" "srs_app_http_api"
2014-04-07 01:34:36 +00:00
"srs_app_http_conn" "srs_app_http_hooks" "srs_app_json" "srs_app_ingest"
2014-04-25 08:35:03 +00:00
"srs_app_ffmpeg" "srs_app_utility" "srs_app_dvr" "srs_app_edge")
2014-03-04 10:46:00 +00:00
APP_INCS="src/app"; MODULE_DIR=${APP_INCS} . auto/modules.sh
2014-03-01 02:05:14 +00:00
APP_OBJS="${MODULE_OBJS[@]}"
2014-02-28 07:42:35 +00:00
#
2014-03-01 11:15:36 +00:00
#LIBS Module, build libsrs.a for static link.
MODULE_ID="LIBS"
MODULE_DEPENDS=("CORE" "KERNEL" "RTMP")
2014-03-01 15:24:53 +00:00
ModuleLibIncs=(${SRS_OBJS})
2014-03-02 01:22:09 +00:00
MODULE_FILES=("srs_librtmp" "srs_lib_simple_socket")
2014-03-04 10:46:00 +00:00
LIBS_INCS="src/libs"; MODULE_DIR=${LIBS_INCS} . auto/modules.sh
2014-03-01 11:15:36 +00:00
LIBS_OBJS="${MODULE_OBJS[@]}"
#
2013-10-17 12:58:04 +00:00
#Main Module
MODULE_ID="MAIN"
2014-03-01 06:05:58 +00:00
MODULE_DEPENDS=("CORE" "KERNEL" "RTMP" "APP")
2014-03-06 10:12:19 +00:00
ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS} ${LibGperfRoot})
2013-12-27 09:03:12 +00:00
MODULE_FILES=("srs_main_server" "srs_main_bandcheck")
2014-03-04 10:46:00 +00:00
MAIN_INCS="src/main"; MODULE_DIR=${MAIN_INCS} . auto/modules.sh
MAIN_OBJS="${MODULE_OBJS[@]}"
2014-03-04 06:01:43 +00:00
2014-02-28 07:42:35 +00:00
#####################################################################################
# Binaries, main entrances, link the module and its depends modules,
# then link to a binary, for example, objs/srs
#
2013-10-17 12:58:04 +00:00
# all main entrances
2013-12-27 09:03:12 +00:00
MAIN_ENTRANCES=("srs_main_server" "srs_main_bandcheck")
2014-03-01 01:52:41 +00:00
#
2014-02-28 07:42:35 +00:00
# all depends libraries
2014-03-06 10:12:19 +00:00
ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile} ${LibGperfFile})
2014-02-28 07:42:35 +00:00
# all depends objects
2014-03-01 06:05:58 +00:00
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}"
2014-03-16 12:16:42 +00:00
LINK_OPTIONS="${SrsLinkOptions}${SrsGprofLink}${SrsGperfLink}"
2014-03-01 01:52:41 +00:00
#
# srs:
2014-02-28 07:42:35 +00:00
# srs(simple rtmp server) over st(state-threads)
2014-03-01 01:35:41 +00:00
BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh
2014-03-08 05:11:26 +00:00
# bandwidth test tool, to test the bandwidth to server
2014-03-07 11:07:38 +00:00
if [ $SRS_BWTC = YES ]; then
BUILD_KEY="bandwidth" APP_MAIN="srs_main_bandcheck" APP_NAME="bandwidth" . auto/apps.sh
fi
2014-03-08 05:11:26 +00:00
# srs librtmp
2014-03-07 10:55:15 +00:00
if [ $SRS_LIBRTMP = YES ]; then
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${LIBS_OBJS[@]}"
BUILD_KEY="librtmp" LIB_NAME="lib/srs_librtmp" . auto/libs.sh
fi
2014-03-04 10:46:00 +00:00
#
# utest, the unit-test cases of srs, base on gtest1.6
2014-03-18 16:47:10 +00:00
MODULE_FILES=("srs_utest" "srs_utest_amf0" "srs_utest_handshake")
2014-03-04 10:46:00 +00:00
ModuleLibIncs=(${SRS_OBJS} ${LibSTRoot})
ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile})
MODULE_DEPENDS=("CORE" "KERNEL" "RTMP" "APP")
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${APP_OBJS[@]}"
2014-03-19 03:24:25 +00:00
LINK_OPTIONS="-lpthread ${SrsLinkOptions}" MODULE_DIR="src/utest" APP_NAME="srs_utest" . auto/utest.sh
2013-10-17 12:58:04 +00:00
echo 'configure ok! '
2014-02-28 13:07:46 +00:00
#####################################################################################
# when configure success, prepare build
#####################################################################################
# create objs/logs for ffmpeg to write log.
mkdir -p ${SRS_OBJS}/logs
2014-02-28 07:10:28 +00:00
#####################################################################################
# configure summary
#####################################################################################
2013-11-30 06:12:19 +00:00
# summary
echo ""
echo "configure summary:"
2014-04-15 08:07:25 +00:00
echo " ${SRS_AUTO_USER_CONFIGURE}"
2014-04-15 06:01:57 +00:00
echo " ${SRS_AUTO_CONFIGURE}"
2013-11-30 06:12:19 +00:00
if [ $SRS_HLS = YES ]; then
2014-04-06 11:19:13 +00:00
echo -e "${GREEN}HLS is enabled${BLACK}"
2013-11-30 06:12:19 +00:00
else
2014-01-05 07:58:17 +00:00
echo -e "${YELLOW}warning: without HLS support${BLACK}"
2013-11-30 06:12:19 +00:00
fi
2014-03-20 06:08:53 +00:00
if [ $SRS_NGINX = YES ]; then
echo -e "${GREEN}Nginx http server is enabled${BLACK}"
else
2014-04-06 11:19:13 +00:00
echo -e "${GREEN}note: Nginx http server is disabled${BLACK}"
2014-03-20 06:08:53 +00:00
fi
2014-04-15 06:01:57 +00:00
if [ $SRS_DVR = YES ]; then
echo -e "${GREEN}DVR is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without DVR support${BLACK}"
fi
2013-11-30 06:12:19 +00:00
if [ $SRS_SSL = YES ]; then
echo -e "${GREEN}rtmp complex handshake is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without rtmp complex handshake support, donot support h264/aac to adobe flash player${BLACK}"
fi
2014-04-08 07:28:34 +00:00
if [ $SRS_FFMPEG_TOOL = YES ]; then
2014-04-06 13:05:18 +00:00
echo -e "${GREEN}transcode/mux/ingest tool FFMPEG is enabled${BLACK}"
2013-11-30 06:12:19 +00:00
else
2014-04-06 13:05:18 +00:00
echo -e "${YELLOW}warning: without transcode/mux/ingest tool FFMPEG support${BLACK}"
fi
if [ $SRS_TRANSCODE = YES ]; then
echo -e "${GREEN}transcoding RTMP stream is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without transcoding RTMP stream support${BLACK}"
fi
if [ $SRS_INGEST = YES ]; then
echo -e "${GREEN}ingest file/stream/device is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without ingest file/stream/device support${BLACK}"
2013-11-30 06:12:19 +00:00
fi
2014-03-10 15:13:09 +00:00
if [ $SRS_HTTP_CALLBACK = YES ]; then
2013-12-07 11:27:31 +00:00
echo -e "${GREEN}http hooks callback over CherryPy is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without http hooks callback over CherryPy support${BLACK}"
fi
2014-04-01 07:33:09 +00:00
if [ $SRS_HTTP_SERVER = YES ]; then
echo -e "${GREEN}http server to delivery http stream is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without http server to delivery http stream support${BLACK}"
fi
2014-04-01 08:06:32 +00:00
if [ $SRS_HTTP_API = YES ]; then
echo -e "${GREEN}http api to manage server is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without http api to manage server support${BLACK}"
fi
2014-03-07 10:55:15 +00:00
if [ $SRS_LIBRTMP = YES ]; then
echo -e "${GREEN}srs-librtmp for client is enabled${BLACK}"
else
echo -e "${YELLOW}note: srs-librtmp for client is disabled${BLACK}"
fi
2014-03-07 11:07:38 +00:00
if [ $SRS_BWTC = YES ]; then
echo -e "${GREEN}srs bandwidth test client is enabled${BLACK}"
else
2014-03-08 03:25:02 +00:00
echo -e "${GREEN}note: srs bandwidth test client is disabled${BLACK}"
2014-03-07 11:07:38 +00:00
fi
2014-02-28 06:38:27 +00:00
if [ $SRS_RESEARCH = YES ]; then
echo -e "${GREEN}research tools are builded${BLACK}"
else
2014-03-08 03:25:02 +00:00
echo -e "${GREEN}note: research tools are not builded${BLACK}"
2014-03-04 03:09:41 +00:00
fi
if [ $SRS_UTEST = YES ]; then
echo -e "${GREEN}utest for srs are builded${BLACK}"
else
echo -e "${YELLOW}note: utest for srs are not builded${BLACK}"
2014-02-28 06:38:27 +00:00
fi
2014-03-07 09:18:31 +00:00
if [ $SRS_GPERF = YES ]; then
echo -e "${GREEN}gperf(tcmalloc) for srs are builded${BLACK}"
else
2014-03-07 10:55:15 +00:00
echo -e "${GREEN}note: gperf(tcmalloc) for srs are not builded${BLACK}"
2014-03-07 09:18:31 +00:00
fi
2014-03-07 04:24:47 +00:00
if [ $SRS_GPERF_MC = YES ]; then
2014-03-07 09:18:31 +00:00
echo -e "${YELLOW}gmc(gperf memory check) for srs are builded -- Performance may suffer${BLACK}"
2014-03-06 06:10:45 +00:00
else
2014-03-07 09:18:31 +00:00
echo -e "${GREEN}note: gmc(gperf memory check) for srs are not builded${BLACK}"
2014-03-07 04:24:47 +00:00
fi
if [ $SRS_GPERF_MP = YES ]; then
2014-03-07 09:18:31 +00:00
echo -e "${YELLOW}gmp(gperf memory profile) for srs are builded -- Performance may suffer${BLACK}"
2014-03-07 04:24:47 +00:00
else
2014-03-07 09:18:31 +00:00
echo -e "${GREEN}note: gmp(gperf memory profile) for srs are not builded${BLACK}"
2014-03-07 04:24:47 +00:00
fi
if [ $SRS_GPERF_CP = YES ]; then
2014-03-07 09:18:31 +00:00
echo -e "${YELLOW}gcp(gperf cpu profile) for srs are builded -- Performance may suffer${BLACK}"
else
echo -e "${GREEN}note: gcp(gperf cpu profile) for srs are not builded${BLACK}"
fi
if [ $SRS_GPROF = YES ]; then
echo -e "${YELLOW}gprof(GNU profile tool) for srs are builded -- Performance may suffer${BLACK}"
2014-03-07 04:24:47 +00:00
else
2014-03-07 09:18:31 +00:00
echo -e "${GREEN}note: gprof(GNU profile tool) for srs are not builded${BLACK}"
2014-03-06 06:10:45 +00:00
fi
2014-03-16 12:16:42 +00:00
if [ $SRS_ARM_UBUNTU12 = YES ]; then
echo -e "${GREEN}arm-ubuntu12(armhf, v7cpu) for srs are builded${BLACK}"
else
echo -e "${GREEN}note: arm-ubuntu12(armhf, v7cpu) for srs are not builded${BLACK}"
fi
2014-05-04 10:38:08 +00:00
if [ $SRS_MIPS_UBUNTU12 = YES ]; then
echo -e "${GREEN}mips-ubuntu12 for srs are builded${BLACK}"
else
echo -e "${GREEN}note: mips-ubuntu12 for srs are not builded${BLACK}"
fi
2013-11-30 06:12:19 +00:00
2014-02-28 07:10:28 +00:00
#####################################################################################
# next step
#####################################################################################
2014-01-05 07:58:17 +00:00
ip=`ifconfig|grep "inet addr"| grep -v "127.0.0.1"|awk '{print $2}'|awk -F ':' 'NR==1 {print $2}'`
2013-11-30 06:12:19 +00:00
echo ""
2013-10-17 12:58:04 +00:00
echo "you can:"
echo "\" make \" to build the srs(simple rtmp server)."
echo "\" make help \" to get the usage of make"
2014-03-20 06:08:53 +00:00
if [ $SRS_NGINX = YES ]; then
2013-11-27 14:41:58 +00:00
echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls"
2014-01-05 07:58:17 +00:00
echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)"
2013-11-27 14:41:58 +00:00
fi
2014-04-08 07:28:34 +00:00
if [ $SRS_FFMPEG_TOOL = YES ]; then
2013-11-30 06:12:19 +00:00
echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding"
fi
2014-03-10 15:13:09 +00:00
if [ $SRS_HTTP_CALLBACK = YES ]; then
2013-12-07 12:34:42 +00:00
echo -e "\" python ./research/api-server/server.py 8085 \" to start the api-server"
fi
2014-03-06 10:14:46 +00:00
echo "\" ./objs/srs -c conf/srs.conf \" to start the srs live server"
2014-04-16 07:22:12 +00:00
echo "\" ./objs/srs.test \" to test srs"