mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
When configure, default to make clean
This commit is contained in:
parent
bfd8971db8
commit
302da32fc5
2 changed files with 21 additions and 1 deletions
|
@ -113,6 +113,8 @@ SRS_TOOL_RANDLIB=randlib
|
|||
SRS_EXTRA_FLAGS=
|
||||
# Set the object files tag name.
|
||||
SRS_BUILD_TAG=
|
||||
# Whether do "make clean" when configure.
|
||||
SRS_CLEAN=YES
|
||||
|
||||
#####################################################################################
|
||||
# menu
|
||||
|
@ -188,6 +190,8 @@ Toolchain options: @see https://github.com/ossrs/srs/issues/1547#issuec
|
|||
--with-nasm Build FFMPEG for RTC with nasm support.
|
||||
--without-nasm Build FFMPEG for RTC without nasm support, for CentOS6 nasm is too old.
|
||||
--build-tag=<TAG> Set the build object directory suffix.
|
||||
--with-clean Configure SRS and do `make clean` if possible.
|
||||
--without-clean Configure SRS and never `make clean` even possible..
|
||||
|
||||
Conflicts:
|
||||
1. --with-gmc vs --with-gmp:
|
||||
|
@ -236,6 +240,7 @@ function parse_user_option() {
|
|||
--with-rtc) SRS_RTC=YES ;;
|
||||
--with-gb28181) SRS_GB28181=YES ;;
|
||||
--with-nasm) SRS_NASM=YES ;;
|
||||
--with-clean) SRS_CLEAN=YES ;;
|
||||
--with-gperf) SRS_GPERF=YES ;;
|
||||
--with-gmc) SRS_GPERF_MC=YES ;;
|
||||
--with-gmd) SRS_GPERF_MD=YES ;;
|
||||
|
@ -255,6 +260,7 @@ function parse_user_option() {
|
|||
--without-rtc) SRS_RTC=NO ;;
|
||||
--without-gb28181) SRS_GB28181=NO ;;
|
||||
--without-nasm) SRS_NASM=NO ;;
|
||||
--without-clean) SRS_CLEAN=NO ;;
|
||||
--without-gperf) SRS_GPERF=NO ;;
|
||||
--without-gmc) SRS_GPERF_MC=NO ;;
|
||||
--without-gmd) SRS_GPERF_MD=NO ;;
|
||||
|
@ -557,6 +563,7 @@ function regenerate_options() {
|
|||
if [ $SRS_RTC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-rtc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-rtc"; fi
|
||||
if [ $SRS_GB28181 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gb28181"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gb28181"; fi
|
||||
if [ $SRS_NASM = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nasm"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nasm"; fi
|
||||
if [ $SRS_CLEAN = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-clean"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-clean"; fi
|
||||
if [ $SRS_GPERF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gperf"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gperf"; fi
|
||||
if [ $SRS_GPERF_MC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmc"; fi
|
||||
if [ $SRS_GPERF_MD = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmd"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmd"; fi
|
||||
|
@ -602,6 +609,12 @@ function check_option_conflicts() {
|
|||
echo "Don't support building FFMPEG, please use docker https://github.com/ossrs/srs-docker"; exit -1;
|
||||
fi
|
||||
|
||||
# For OSX, recommend to use DTrace, https://blog.csdn.net/win_lin/article/details/53503869
|
||||
if [[ $SRS_OSX == YES && $SRS_GPROF == YES ]]; then
|
||||
echo "Tool gprof for OSX is unavailable, please use dtrace, read https://blog.csdn.net/win_lin/article/details/53503869"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# TODO: FIXME: check more os.
|
||||
|
||||
__check_ok=YES
|
||||
|
|
|
@ -10,6 +10,11 @@ if [[ ${SRS_BUILD_TAG} != "" ]]; then
|
|||
fi
|
||||
echo "SRS_WORKDIR: ${SRS_WORKDIR}, SRS_OBJS_DIR: ${SRS_OBJS_DIR}, SRS_OBJS: ${SRS_OBJS}, SRS_PLATFORM: ${SRS_PLATFORM}"
|
||||
|
||||
if [[ $SRS_CLEAN == YES && -f Makefile ]]; then
|
||||
echo "Do full cleanup, you can disable it by: --without-clean"
|
||||
make clean
|
||||
fi
|
||||
|
||||
# For src object files on each platform.
|
||||
(
|
||||
mkdir -p ${SRS_OBJS_DIR} && cd ${SRS_OBJS_DIR} &&
|
||||
|
@ -20,5 +25,7 @@ echo "SRS_WORKDIR: ${SRS_WORKDIR}, SRS_OBJS_DIR: ${SRS_OBJS_DIR}, SRS_OBJS: ${SR
|
|||
mkdir -p ${SRS_PLATFORM}/include && ln -sf ${SRS_PLATFORM}/include &&
|
||||
mkdir -p ${SRS_PLATFORM}/lib && ln -sf ${SRS_PLATFORM}/lib
|
||||
)
|
||||
if [[ $SRS_CLEAN == NO ]]; then
|
||||
echo "Fast cleanup, if need to do full cleanup, please use: make clean"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue