mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the build script
This commit is contained in:
parent
0322dbbfb2
commit
e53655ee83
5 changed files with 48 additions and 24 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -11,3 +11,16 @@
|
||||||
*.lai
|
*.lai
|
||||||
*.la
|
*.la
|
||||||
*.a
|
*.a
|
||||||
|
|
||||||
|
# by winlin
|
||||||
|
*.pyc
|
||||||
|
*.swp
|
||||||
|
/trunk/Makefile
|
||||||
|
/trunk/objs
|
||||||
|
/trunk/research/librtmp/objs
|
||||||
|
/trunk/3rdparty/ccache/ccache-3.1.9
|
||||||
|
/trunk/3rdparty/gprof/graphviz-2.36.0
|
||||||
|
/trunk/research/api-server/static-dir/crossdomain.xml
|
||||||
|
/trunk/research/api-server/static-dir/forward
|
||||||
|
/trunk/research/api-server/static-dir/live
|
||||||
|
/trunk/research/api-server/static-dir/players
|
||||||
|
|
|
@ -571,6 +571,10 @@ if [ $SRS_RESEARCH = YES ]; then
|
||||||
|
|
||||||
(cd research/ffempty && make ${SRS_JOBS} && mv ffempty ../../${SRS_OBJS}/research)
|
(cd research/ffempty && make ${SRS_JOBS} && mv ffempty ../../${SRS_OBJS}/research)
|
||||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build research/ffempty failed, ret=$ret"; exit $ret; fi
|
ret=$?; if [[ $ret -ne 0 ]]; then echo "build research/ffempty failed, ret=$ret"; exit $ret; fi
|
||||||
|
|
||||||
|
# librtmp
|
||||||
|
(cd research/librtmp && mkdir -p objs && ln -sf `pwd`/objs ../../${SRS_OBJS}/research/librtmp)
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then echo "link research/librtmp failed, ret=$ret"; exit $ret; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
19
trunk/configure
vendored
19
trunk/configure
vendored
|
@ -157,7 +157,7 @@ echo -e " | ${SrsGprofSummaryColor}rm -f gmon.out; ./objs/srs -c conf/sr
|
||||||
echo -e " | ${SrsGprofSummaryColor}killall -2 srs # or CTRL+C to stop 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 " | ${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 " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||||
echo -e " |${SrsResearchSummaryColor}research: ./objs/research, api server, players, ts info.\${BLACK}"
|
echo -e " |${SrsResearchSummaryColor}research: ./objs/research, api server, players, ts info, librtmp.\${BLACK}"
|
||||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||||
echo -e " |${SrsBWTCSummaryColor}bandwidth: ./objs/bandwidth, the bandwidth test client\${BLACK}"
|
echo -e " |${SrsBWTCSummaryColor}bandwidth: ./objs/bandwidth, the bandwidth test client\${BLACK}"
|
||||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||||
|
@ -176,10 +176,12 @@ echo -e " | ${SrsDvrSummaryColor}dvr @see: https://github.com/winlinvip/
|
||||||
echo -e " | ${SrsDvrSummaryColor}dvr: record RTMP stream to flv files.\${BLACK}"
|
echo -e " | ${SrsDvrSummaryColor}dvr: record RTMP stream to flv files.\${BLACK}"
|
||||||
echo -e " | ${SrsNginxSummaryColor}nginx @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}"
|
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}"
|
echo -e " | ${SrsNginxSummaryColor}nginx: delivery HLS stream by nginx\${BLACK}"
|
||||||
|
echo -e " | ${SrsNginxSummaryColor}nginx: sudo ./objs/nginx/sbin/nginx\${BLACK}"
|
||||||
echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\${BLACK}"
|
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 " | ${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}"
|
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}"
|
||||||
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: transcode, mux, ingest tool\${BLACK}"
|
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: transcode, mux, ingest tool\${BLACK}"
|
||||||
|
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: ./objs/ffmpeg/bin/ffmpeg\${BLACK}"
|
||||||
echo -e " | ${SrsTranscodeSummaryColor}transcode @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${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}"
|
echo -e " | ${SrsTranscodeSummaryColor}transcode: support transcoding RTMP stream\${BLACK}"
|
||||||
echo -e " | ${SrsIngestSummaryColor}ingest @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Ingest\${BLACK}"
|
echo -e " | ${SrsIngestSummaryColor}ingest @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Ingest\${BLACK}"
|
||||||
|
@ -192,6 +194,10 @@ echo -e " | ${SrsHttpApiSummaryColor}http-api @see: https://github.com/w
|
||||||
echo -e " | ${SrsHttpApiSummaryColor}http-api: support http api to manage server\${BLACK}"
|
echo -e " | ${SrsHttpApiSummaryColor}http-api: support http api to manage server\${BLACK}"
|
||||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||||
echo -e "\${GREEN}binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\${BLACK}"
|
echo -e "\${GREEN}binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\${BLACK}"
|
||||||
|
|
||||||
|
echo "you can:"
|
||||||
|
echo " ./objs/srs -c conf/srs.conf"
|
||||||
|
echo " to start the srs server, with config file."
|
||||||
END
|
END
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
@ -651,12 +657,9 @@ fi
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
ip=`ifconfig|grep "inet addr"| grep -v "127.0.0.1"|awk '{print $2}'|awk -F ':' 'NR==1 {print $2}'`
|
ip=`ifconfig|grep "inet addr"| grep -v "127.0.0.1"|awk '{print $2}'|awk -F ':' 'NR==1 {print $2}'`
|
||||||
echo ""
|
echo ""
|
||||||
echo "you can:"
|
echo "to run 3rdparty application:"
|
||||||
echo "\" make \" to build the srs(simple rtmp server)."
|
|
||||||
echo "\" make help \" to get the usage of make"
|
|
||||||
if [ $SRS_NGINX = YES ]; then
|
if [ $SRS_NGINX = YES ]; then
|
||||||
echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls"
|
echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls"
|
||||||
echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)"
|
|
||||||
fi
|
fi
|
||||||
if [ $SRS_FFMPEG_TOOL = YES ]; then
|
if [ $SRS_FFMPEG_TOOL = YES ]; then
|
||||||
echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding"
|
echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding"
|
||||||
|
@ -664,5 +667,7 @@ fi
|
||||||
if [ $SRS_HTTP_CALLBACK = YES ]; then
|
if [ $SRS_HTTP_CALLBACK = YES ]; then
|
||||||
echo -e "\" python ./research/api-server/server.py 8085 \" to start the api-server"
|
echo -e "\" python ./research/api-server/server.py 8085 \" to start the api-server"
|
||||||
fi
|
fi
|
||||||
echo "\" ./objs/srs -c conf/srs.conf \" to start the srs live server"
|
echo ""
|
||||||
echo "\" ./objs/srs.test \" to test srs"
|
echo "to build:"
|
||||||
|
echo "\" make \" to build the srs(simple rtmp server)."
|
||||||
|
echo "\" make help \" to get the usage of make"
|
||||||
|
|
|
@ -3,7 +3,7 @@ GCC = gcc
|
||||||
ifeq ($(HANDSHAKE),)
|
ifeq ($(HANDSHAKE),)
|
||||||
ST_ALL = help
|
ST_ALL = help
|
||||||
else
|
else
|
||||||
ST_ALL = srs_flv_parser srs_flv_injecter srs_publish srs_play srs_ingest_flv srs_ingest_rtmp srs_detect_rtmp
|
ST_ALL = objs/srs_flv_parser objs/srs_flv_injecter objs/srs_publish objs/srs_play objs/srs_ingest_flv objs/srs_ingest_rtmp objs/srs_detect_rtmp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: default clean help ssl nossl
|
.PHONY: default clean help ssl nossl
|
||||||
|
@ -32,7 +32,7 @@ help:
|
||||||
@echo "Remark: before make this sample, user must make the srs, with/without ssl"
|
@echo "Remark: before make this sample, user must make the srs, with/without ssl"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -f srs_flv_parser srs_flv_injecter srs_publish srs_play srs_ingest_flv srs_ingest_rtmp srs_detect_rtmp
|
@rm -rf objs
|
||||||
|
|
||||||
# srs library root
|
# srs library root
|
||||||
SRS_OBJS = ../../objs
|
SRS_OBJS = ../../objs
|
||||||
|
@ -62,27 +62,29 @@ ifeq ($(HANDSHAKE), SSL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ssl:
|
ssl:
|
||||||
|
@mkdir -p objs
|
||||||
$(MAKE) HANDSHAKE="SSL"
|
$(MAKE) HANDSHAKE="SSL"
|
||||||
nossl:
|
nossl:
|
||||||
|
@mkdir -p objs
|
||||||
$(MAKE) HANDSHAKE="NOSSL"
|
$(MAKE) HANDSHAKE="NOSSL"
|
||||||
|
|
||||||
srs_flv_parser: srs_flv_parser.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L)
|
objs/srs_flv_parser: srs_flv_parser.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L)
|
||||||
$(GCC) srs_flv_parser.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o srs_flv_parser
|
$(GCC) srs_flv_parser.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o objs/srs_flv_parser
|
||||||
|
|
||||||
srs_flv_injecter: srs_flv_injecter.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L)
|
objs/srs_flv_injecter: srs_flv_injecter.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L)
|
||||||
$(GCC) srs_flv_injecter.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o srs_flv_injecter
|
$(GCC) srs_flv_injecter.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o objs/srs_flv_injecter
|
||||||
|
|
||||||
srs_publish: srs_publish.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
objs/srs_publish: srs_publish.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
||||||
$(GCC) srs_publish.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o srs_publish
|
$(GCC) srs_publish.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o objs/srs_publish
|
||||||
|
|
||||||
srs_play: srs_play.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
objs/srs_play: srs_play.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
||||||
$(GCC) srs_play.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o srs_play
|
$(GCC) srs_play.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o objs/srs_play
|
||||||
|
|
||||||
srs_ingest_flv: srs_ingest_flv.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
objs/srs_ingest_flv: srs_ingest_flv.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
||||||
$(GCC) srs_ingest_flv.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o srs_ingest_flv
|
$(GCC) srs_ingest_flv.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o objs/srs_ingest_flv
|
||||||
|
|
||||||
srs_ingest_rtmp: srs_ingest_rtmp.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
objs/srs_ingest_rtmp: srs_ingest_rtmp.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
||||||
$(GCC) srs_ingest_rtmp.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o srs_ingest_rtmp
|
$(GCC) srs_ingest_rtmp.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o objs/srs_ingest_rtmp
|
||||||
|
|
||||||
srs_detect_rtmp: srs_detect_rtmp.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
objs/srs_detect_rtmp: srs_detect_rtmp.c $(SRS_RESEARCH_DEPS) $(SRS_LIBRTMP_I) $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L)
|
||||||
$(GCC) srs_detect_rtmp.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o srs_detect_rtmp
|
$(GCC) srs_detect_rtmp.c $(SRS_LIBRTMP_L) $(SRS_LIBSSL_L) $(EXTRA_CXX_FLAG) -o objs/srs_detect_rtmp
|
||||||
|
|
|
@ -42,7 +42,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
extern "C"{
|
extern "C"{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// the output handler.
|
// the RTMP handler.
|
||||||
typedef void* srs_rtmp_t;
|
typedef void* srs_rtmp_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue