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

For #2532: Windows: Replace ln by cp for windows. v5.0.87 (#3246)

1. Replase ln by cp for windows.
2. Refine OS and CPU arch detecting.
3. Support configure from any directory by `SRS_WORKDIR`.
4. Support output to any directory by `SRS_OUTPUT`.
5. Disable sanitizer for gperf.
6. Use parallels build for make.
7. Refine bash variable check.
This commit is contained in:
wenjie.zhao 2022-11-18 23:02:35 +08:00 committed by winlin
parent 368356c223
commit e9503a9c9a
13 changed files with 535 additions and 555 deletions

View file

@ -2,8 +2,7 @@
#
# params:
# $SRS_OBJS the objs directory to store the Makefile. ie. ./objs
# $SRS_OBJS_DIR the objs directory for Makefile. ie. objs
# $SRS_MAKEFILE the makefile name. ie. Makefile
# $SRS_OBJS the objs directory for Makefile. ie. objs
#
# $MAIN_ENTRANCES array, disable all except the $APP_MAIN itself. ie. ["srs_main_server"]
# $APP_MAIN the object file that contains main function. ie. srs_main_server
@ -13,9 +12,9 @@
# $ModuleLibFiles array, the 3rdpart library file to link with. ie. [objs/st-1.9/obj/libst.a objs/libx264/obj/libx264.a]
# $LINK_OPTIONS the linker options. ie. -ldl
FILE=${SRS_OBJS}/${SRS_MAKEFILE}
FILE=${SRS_OBJS}/Makefile
APP_TARGET="${SRS_OBJS_DIR}/${APP_NAME}"
APP_TARGET="${SRS_OBJS}/${APP_NAME}"
echo "Generating app ${APP_NAME} depends.";
@ -40,15 +39,16 @@ for item in ${MODULE_OBJS[*]}; do
fi
done
if [ ! -f ${item} ]; then
if [ ! -f ${SRS_WORKDIR}/${item} ]; then
ignored=1
fi
if [ ${ignored} == 1 ]; then
echo "Ignore file ${FILE_NAME}"
continue;
fi
OBJ_FILE=${SRS_OBJS_DIR}/$item
OBJ_FILE=${SRS_OBJS}/$item
OBJ_FILE="${OBJ_FILE%.*}.o"
echo -n "${OBJ_FILE} " >> ${FILE}
done
@ -71,15 +71,16 @@ for item in ${MODULE_OBJS[*]}; do
fi
done
if [ ! -f ${item} ]; then
if [ ! -f ${SRS_WORKDIR}/${item} ]; then
ignored=1
fi
if [ ${ignored} == 1 ]; then
echo "Ignore file ${FILE_NAME}"
continue;
fi
OBJ_FILE=${SRS_OBJS_DIR}/$item
OBJ_FILE=${SRS_OBJS}/$item
OBJ_FILE="${OBJ_FILE%.*}.o"
echo -n "${OBJ_FILE} " >> ${FILE}
done