Skip to content

Commit

Permalink
For #1250, support osx build
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Mar 28, 2020
1 parent 0a030a4 commit 218fe33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions trunk/auto/depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,14 @@ fi
#####################################################################################
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
# check the cross build flag file, if flag changed, need to rebuild the st.
_ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_EPOLL"
_ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_EPOLL" && _ST_LD=${SRS_TOOL_LD}
if [[ $SRS_VALGRIND == YES ]]; then
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMD_VALGRIND"
fi
# for osx, use darwin for st, donot use epoll.
if [[ $SRS_OSX == YES ]]; then
_ST_MAKE=darwin-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_KQUEUE" && _ST_LD=${SRS_TOOL_CC}
fi
# Pass the global extra flags.
if [[ $SRS_EXTRA_FLAGS != '' ]]; then
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS $SRS_EXTRA_FLAGS"
Expand All @@ -325,7 +329,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
rm -rf ${SRS_OBJS}/st-srs && cd ${SRS_OBJS} &&
ln -sf ../3rdparty/st-srs && cd st-srs &&
make clean && make ${_ST_MAKE} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" \
CC=${SRS_TOOL_CC} AR=${SRS_TOOL_AR} LD=${SRS_TOOL_LD} RANDLIB=${SRS_TOOL_RANDLIB} &&
CC=${SRS_TOOL_CC} AR=${SRS_TOOL_AR} LD=${_ST_LD} RANDLIB=${SRS_TOOL_RANDLIB} &&
cd .. && rm -f st && ln -sf st-srs/obj st
)
fi
Expand Down

0 comments on commit 218fe33

Please sign in to comment.