mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine configure
This commit is contained in:
parent
68a5407b3a
commit
ad87bd7cf2
4 changed files with 12 additions and 10 deletions
9
trunk/configure
vendored
9
trunk/configure
vendored
|
@ -95,17 +95,24 @@ CppStd="-ansi"
|
|||
if [[ $SRS_EXPORT_LIBRTMP_PROJECT == YES ]]; then
|
||||
LibraryCompile=" -fPIC"
|
||||
fi
|
||||
# For MacOS, disable the link warnings:
|
||||
# srs_librtmp.a(srs_kernel_io.o) unable to open object file: No such file or directory
|
||||
if [[ $SRS_OSX == YES ]]; then
|
||||
CxxMacOS=" -D GCC_GENERATE_DEBUGGING_SYMBOLS=no"
|
||||
fi
|
||||
# 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}"
|
||||
CXXFLAGS="${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}${CxxMacOS}"
|
||||
if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi
|
||||
# Start to generate the Makefile.
|
||||
cat << END > ${SRS_OBJS}/${SRS_MAKEFILE}
|
||||
GCC = gcc
|
||||
CXX = g++
|
||||
AR = ar
|
||||
ARFLAGS = -rs
|
||||
LINK = g++
|
||||
CXXFLAGS = ${CXXFLAGS}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue