mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine build script
This commit is contained in:
parent
95f656b46d
commit
70d51ffc5b
2 changed files with 14 additions and 8 deletions
|
@ -29,8 +29,8 @@ echo "# INCS for ${MODULE_ID}, headers of module and its depends to compile" >>
|
|||
echo "${MODULE_ID}_MODULE_INCS = -I${MODULE_DIR} " >> ${FILE}
|
||||
#
|
||||
# the private include files, for example:
|
||||
# CORE_INCS = -Isrc/core -Iobjs/st -Iobjs -Iobjs/hp -Iobjs
|
||||
# MAIN_INCS = -Isrc/main $(CORE_MODULE_INCS) -Iobjs/st -Iobjs
|
||||
# CORE_INCS = -Isrc/core -Iobjs
|
||||
# CORE_LIBS_INCS = -Iobjs/st -Iobjs/ffmpeg/include
|
||||
# where the public will be used for other modules which depends on it.
|
||||
INCS_NAME="${MODULE_ID}_INCS"
|
||||
#
|
||||
|
@ -39,12 +39,14 @@ echo -n "${INCS_NAME} = -I${MODULE_DIR} " >> ${FILE}
|
|||
#
|
||||
# depends module header files
|
||||
for item in ${MODULE_DEPENDS[*]}; do
|
||||
DEP_INCS_NAME="${item}_INCS"do
|
||||
DEP_INCS_NAME="${item}_MODULE_INCS"
|
||||
echo -n "\$(${DEP_INCS_NAME})" >> ${FILE}
|
||||
done
|
||||
echo "" >> ${FILE}
|
||||
#
|
||||
# depends library header files
|
||||
INCS_LIBS_NAME="${MODULE_ID}_LIBS_INCS"
|
||||
echo -n "${INCS_LIBS_NAME} = " >> ${FILE}
|
||||
for item in ${ModuleLibIncs[*]}; do
|
||||
echo -n "-I${item} " >> ${FILE}
|
||||
done
|
||||
|
@ -81,6 +83,7 @@ for item in ${MODULE_FILES[*]}; do
|
|||
echo "${OBJ_FILE}: \$(${DEPS_NAME}) ${CPP_FILE} " >> ${FILE}
|
||||
echo " \$(CXX) -c \$(CXXFLAGS) ${DEFINES}\\" >> ${FILE}
|
||||
echo " \$(${INCS_NAME})\\" >> ${FILE}
|
||||
echo " \$(${INCS_LIBS_NAME})\\" >> ${FILE}
|
||||
echo " -o ${OBJ_FILE} \\" >> ${FILE}
|
||||
echo " ${CPP_FILE}" >> ${FILE}
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue