1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge branch '3.0release' into 4.0release

This commit is contained in:
winlin 2020-03-29 16:52:46 +08:00
commit 22ec783c3f
8 changed files with 102 additions and 44 deletions

56
trunk/configure vendored
View file

@ -8,8 +8,6 @@ SRS_WORKDIR="."
SRS_OBJS_DIR="objs"
SRS_OBJS="${SRS_WORKDIR}/${SRS_OBJS_DIR}"
SRS_MAKEFILE="Makefile"
SRS_PLATFORM=`uname -s`-`uname -r|awk -F '-' '{print $1}'`
echo "SRS_WORKDIR: ${SRS_WORKDIR}, SRS_OBJS_DIR: ${SRS_OBJS_DIR}, SRS_OBJS: ${SRS_OBJS}, SRS_PLATFORM: ${SRS_PLATFORM}"
# linux shell color support.
RED="\\033[31m"
@ -43,11 +41,6 @@ mkdir -p ${SRS_OBJS}/${SRS_PLATFORM}
# the auto generated variables.
. auto/auto_headers.sh
# For src object files on each platform.
echo "Fast cleanup, if need to do full cleanup, please use: make clean"
(cd ${SRS_OBJS_DIR} && rm -rf src srs srs_hls_ingester srs_mp4_parser &&
mkdir -p ${SRS_PLATFORM}/src && ln -sf ${SRS_PLATFORM}/src)
#####################################################################################
# generate Makefile.
#####################################################################################
@ -59,7 +52,7 @@ SrsLibrtmpSampleEntry="nossl"
if [ $SRS_SSL = YES ]; then SrsLibrtmpSampleEntry="ssl";fi
# utest make entry, (cd utest; make)
SrsUtestMakeEntry="@echo -e \"ignore utest for it's disabled\""
if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS_DIR}/utest; \$(MAKE))"; fi
if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM}/utest && \$(MAKE))"; fi
#####################################################################################
# finger out modules to install.
@ -393,7 +386,9 @@ mv ${SRS_WORKDIR}/${SRS_MAKEFILE} ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk
# generate phony header
cat << END > ${SRS_WORKDIR}/${SRS_MAKEFILE}
.PHONY: default _default install install-api help clean doclean destroy server srs_ingest_hls librtmp utest _prepare_dir $__mphonys
.PHONY: default _default install install-api help clean destroy server srs_ingest_hls librtmp utest _prepare_dir $__mphonys
.PHONY: clean_srs clean_modules clean_st clean_openssl clean_ffmpeg clean_nginx clean_cherrypy
.PHONY: st
# install prefix.
SRS_PREFIX=${SRS_PREFIX}
@ -414,14 +409,18 @@ _default: server srs_ingest_hls librtmp utest __modules $__mdefaults
help:
@echo "Usage: make <help>|<clean>|<destroy>|<server>|<librtmp>|<utest>|<install>|<install-api>|<uninstall>"
@echo " help display this help menu"
@echo " clean cleanup project"
@echo " destroy Deep cleanup project and depends"
@echo " clean cleanup project and all depends"
@echo " destroy Cleanup all files for this platform in ${SRS_OBJS_DIR}/${SRS_PLATFORM}"
@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 "To clean special module:"
@echo " clean_st Clean depend st-srs in ${SRS_OBJS_DIR}/${SRS_PLATFORM}/st-srs"
@echo " clean_openssl Clean depend openssl in objs"
@echo " clean_ffmpeg Clean depend ffmpeg in objs"
@echo "@remark all modules will auto genearted and build"
@echo "For example:"
@echo " make"
@ -434,13 +433,34 @@ doclean:
(cd research/librtmp && make clean)
(cd research/api-server/static-dir && rm -rf crossdomain.xml forward live players)
clean: doclean
@echo "You can do full clean by: make destroy"
clean: clean_srs clean_modules
@echo "You can clean each some components, see make help"
destroy: clean
(cd 3rdparty/st-srs && rm -rf Linux_* Darwin_* obj)
(cd 3rdparty/ffmpeg-4.2-fit && rm -rf Linux-* Darwin-*)
(cd ${SRS_OBJS_DIR} && rm -rf Linux-* Darwin-*)
destroy: clean_st clean_openssl clean_ffmpeg clean_nginx clean_cherrypy
(cd ${SRS_OBJS_DIR} && rm -rf ${SRS_PLATFORM})
clean_srs:
(cd ${SRS_OBJS_DIR} && rm -rf srs srs_utest)
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && rm -rf src include lib utest)
clean_modules:
(cd ${SRS_OBJS_DIR} && rm -rf $__mdefaults)
clean_st:
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM}/st-srs && make clean)
clean_openssl:
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && rm -rf openssl*)
clean_ffmpeg:
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && rm -rf ffmpeg)
clean_nginx:
(cd ${SRS_OBJS_DIR} && rm -rf nginx)
clean_cherrypy:
(cd research/librtmp && make clean)
(cd research/api-server/static-dir && rm -rf crossdomain.xml forward live players)
END
@ -570,7 +590,7 @@ librtmp: server
@echo "Building the client publish/play library."
\$(MAKE) -f ${SRS_OBJS_DIR}/${SRS_MAKEFILE} librtmp
@echo "Building the srs-librtmp example."
(cd research/librtmp; \$(MAKE) EXTRA_CXXFLAGS="${SrsGcov}" ${SrsLibrtmpSampleEntry})
(cd research/librtmp && \$(MAKE) EXTRA_CXXFLAGS="${SrsGcov}" ${SrsLibrtmpSampleEntry})
END
else