mirror of
https://github.com/ossrs/srs.git
synced 2025-02-14 20:31:56 +00:00
update build srs librtmp single
This commit is contained in:
parent
c3986d9d6d
commit
0c39a704c2
2 changed files with 7 additions and 4 deletions
|
@ -93,12 +93,12 @@ SRS_LIBRTMP_OBJS="${LIBS_OBJS[@]}" && build_module_cpp
|
||||||
|
|
||||||
# create example.cpp
|
# create example.cpp
|
||||||
FILE=$SRS_EXPORT_LIBRTMP_SINGLE/example.c
|
FILE=$SRS_EXPORT_LIBRTMP_SINGLE/example.c
|
||||||
COMPILE='gcc example.c srs_librtmp.cpp -g -O0 -lstdc++ -o example'
|
SRS_SINGLE_LIBRTMP_COMPILE='gcc example.c srs_librtmp.cpp -g -O0 -lstdc++ -o example'
|
||||||
cat << END >$FILE
|
cat << END >$FILE
|
||||||
/**
|
/**
|
||||||
# Example to use srs-librtmp
|
# Example to use srs-librtmp
|
||||||
# see: https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_SrsLibrtmp
|
# see: https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_SrsLibrtmp
|
||||||
${COMPILE}
|
${SRS_SINGLE_LIBRTMP_COMPILE}
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "srs_librtmp.h"
|
#include "srs_librtmp.h"
|
||||||
|
@ -119,9 +119,10 @@ int main(int argc, char** argv)
|
||||||
END
|
END
|
||||||
|
|
||||||
# compile the example
|
# compile the example
|
||||||
(cd $SRS_EXPORT_LIBRTMP_SINGLE && `${COMPILE}` && ./example && rm -f example)
|
(cd $SRS_EXPORT_LIBRTMP_SINGLE && echo "${SRS_SINGLE_LIBRTMP_COMPILE}" &&
|
||||||
|
`${SRS_SINGLE_LIBRTMP_COMPILE}` && ./example && rm -f example)
|
||||||
ret=$?; if [[ $ret -ne 0 ]]; then
|
ret=$?; if [[ $ret -ne 0 ]]; then
|
||||||
echo "(cd $SRS_EXPORT_LIBRTMP_SINGLE && ${COMPILE} && ./example && rm -f example)"
|
echo "(cd $SRS_EXPORT_LIBRTMP_SINGLE && ${SRS_SINGLE_LIBRTMP_COMPILE} && ./example && rm -f example)"
|
||||||
echo -e "${RED}failed to compile example.${BLACK}"
|
echo -e "${RED}failed to compile example.${BLACK}"
|
||||||
exit $ret
|
exit $ret
|
||||||
fi
|
fi
|
||||||
|
|
2
trunk/configure
vendored
2
trunk/configure
vendored
|
@ -599,6 +599,8 @@ else
|
||||||
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.h ${BLACK}"
|
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.h ${BLACK}"
|
||||||
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.cpp ${BLACK}"
|
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.cpp ${BLACK}"
|
||||||
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/example.c ${BLACK}"
|
echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/example.c ${BLACK}"
|
||||||
|
echo -e "${GREEN}To compile the example: ${BLACK}"
|
||||||
|
echo -e "${GREEN} cd $SRS_EXPORT_LIBRTMP_PROJECT && $SRS_SINGLE_LIBRTMP_COMPILE ${BLACK}"
|
||||||
# for srs-librtmp project.
|
# for srs-librtmp project.
|
||||||
else
|
else
|
||||||
echo -e "${GREEN}Please use the srs-librtmp project: ${BLACK}"
|
echo -e "${GREEN}Please use the srs-librtmp project: ${BLACK}"
|
||||||
|
|
Loading…
Reference in a new issue