Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-03-23 17:49:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1cb2992808cb7e0b2b9dc5dacd6978c63286c4e3
1cb29928
1 parent
2f2aaf5e
refine build for modules, add defines.
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
5 行增加
和
1 行删除
trunk/auto/modules.sh
trunk/configure
trunk/modules/readme.txt
trunk/auto/modules.sh
查看文件 @
1cb2992
...
...
@@ -10,6 +10,7 @@
# $MODULE_DEPENDS array, the denpend MODULEs id. ie. (CORE OS)
# $ModuleLibIncs array, the depend 3rdpart library includes. ie. (objs/st-1.9/obj objs/libx264/obj)
# $MODULE_FILES array, the head/cpp files of modules. ie. (public log)
# $DEFINES string, the build macro defines. ie. "-DMY_SRS"
#
# returns:
# $MODULE_OBJS array, the objects of the modules, used for link the binary
...
...
@@ -78,7 +79,7 @@ for item in ${MODULE_FILES[*]}; do
MODULE_OBJS
=
"
${
MODULE_OBJS
[@]
}
${
CPP_FILE
}
"
if
[
-f
${
CPP_FILE
}
]
;
then
echo
"
${
OBJ_FILE
}
:
\$
(
${
DEPS_NAME
}
)
${
CPP_FILE
}
"
>>
${
FILE
}
echo
"
\$
(CXX) -c
\$
(CXXFLAGS)
\$
(
${
INCS_NAME
}
)
\\
"
>>
${
FILE
}
echo
"
\$
(CXX) -c
\$
(CXXFLAGS)
${
DEFINES
}
\$
(
${
INCS_NAME
}
)
\\
"
>>
${
FILE
}
echo
" -o
${
OBJ_FILE
}
${
CPP_FILE
}
"
>>
${
FILE
}
fi
done
...
...
trunk/configure
查看文件 @
1cb2992
...
...
@@ -175,10 +175,12 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
"srs_app_kbps"
"srs_app_heartbeat"
"srs_app_empty"
"srs_app_http_client"
"srs_app_recv_thread"
"srs_app_security"
"srs_app_statistic"
"srs_app_hds"
"srs_app_mpegts_udp"
"srs_app_rtsp"
"srs_app_listener"
)
DEFINES
=
""
# add each modules for app
for
SRS_MODULE
in
$SRS_MODULES
;
do
.
$SRS_MODULE
/config
MODULE_FILES+
=(
$SRS_MODULE_APP
)
DEFINES
=
"
${
DEFINES
}
${
SRS_MODULE_DEFINES
}
"
done
APP_INCS
=
"src/app"
;
MODULE_DIR
=
${
APP_INCS
}
. auto/modules.sh
APP_OBJS
=
"
${
MODULE_OBJS
[@]
}
"
...
...
trunk/modules/readme.txt
查看文件 @
1cb2992
...
...
@@ -7,5 +7,6 @@ SRS模块规则:
1. SRS_MODULE_NAME:模块名称,用来做Makefile的phony以及执行binary文件名。
2. SRS_MODULE_MAIN:模块的main函数所在的cpp文件,在src/main目录。
3. SRS_MODULE_APP:模块在src/app目录的源文件列表。
4. SRS_MODULE_DEFINES: 模块编译时的额外宏定义。
winlin, 2015.3
...
...
请
注册
或
登录
后发表评论