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
2014-02-28 13:17:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cd7e6cc321c1ac743e10e5539bd5fe93b2b112ef
cd7e6cc3
1 parent
25cb3054
refine the configure, add comments
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
30 行增加
和
21 行删除
trunk/auto/depends.sh
trunk/configure
trunk/auto/depends.sh
查看文件 @
cd7e6cc
#!/bin/bash
function
require_sudoer
()
{
sudo
echo
""
>/dev/null 2>&1
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"
\"
$1
\"
require sudoer failed. ret=
$ret
"
;
exit
$ret
;
fi
}
# TODO: check gcc/g++
echo
"check gcc/g++/gdb/make/openssl-devel"
echo
"depends tools are ok"
...
...
trunk/configure
查看文件 @
cd7e6cc
#!/bin/bash
SRS_MAKEFILE
=
"Makefile"
#####################################################################################
# the main output dir, all configure and make output are in this dir.
#####################################################################################
# create the main objs
SRS_OBJS
=
"objs"
SRS_AUTO_HEADERS_H
=
"
${
SRS_OBJS
}
/srs_auto_headers.hpp"
mkdir -p
${
SRS_OBJS
}
# linux shell color support.
RED
=
"
\\
e[31m"
GREEN
=
"
\\
e[32m"
YELLOW
=
"
\\
e[33m"
BLACK
=
"
\\
e[0m"
# parse user options.
#####################################################################################
# parse user options, set the variables like SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP
#####################################################################################
# parse options, exit with error when parse options invalid.
. auto/options.sh
function
require_sudoer
()
{
sudo
echo
""
>/dev/null 2>&1
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"
\"
$1
\"
require sudoer failed. ret=
$ret
"
;
exit
$ret
;
fi
}
# clean the exists
# do this only when the options is ok.
if
[[
-f Makefile
]]
;
then
make clean
fi
# generate the audo headers file.
#####################################################################################
# generate auto headers file, depends on the finished of options.sh
#####################################################################################
# write user options to headers
SRS_AUTO_HEADERS_H
=
"
${
SRS_OBJS
}
/srs_auto_headers.hpp"
echo
"#define SRS_CONFIGURE
\"
${
SRS_CONFIGURE
}
\"
"
>
$SRS_AUTO_HEADERS_H
echo
"#define SRS_BUILD_DATE
\"
`
date
\"
+%Y-%m-%d %H:%M:%S
\"
`
\"
"
>>
$SRS_AUTO_HEADERS_H
echo
"#define SRS_BUILD_TS
\"
`
date +%s
`
\"
"
>>
$SRS_AUTO_HEADERS_H
...
...
@@ -46,6 +39,7 @@ echo "" >> $SRS_AUTO_HEADERS_H
#####################################################################################
echo
"generate Makefile"
SRS_MAKEFILE
=
"Makefile"
cat
<< END > ${SRS_MAKEFILE}
.PHONY: default help clean server bandwidth _prepare_dir
default: server bandwidth
...
...
@@ -152,6 +146,11 @@ BUILD_KEY="bandwidth" APP_MAIN="srs_main_bandcheck" APP_NAME="bandwidth" SO_PATH
echo
'configure ok! '
# linux shell color support.
RED
=
"
\\
e[31m"
GREEN
=
"
\\
e[32m"
YELLOW
=
"
\\
e[33m"
BLACK
=
"
\\
e[0m"
# summary
echo
""
echo
"configure summary:"
...
...
请
注册
或
登录
后发表评论