正在显示
4 个修改的文件
包含
21 行增加
和
9 行删除
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | # variables, parent script must set it: | 3 | # variables, parent script must set it: |
| 4 | # SRS_JOBS: the build jobs. | 4 | # SRS_JOBS: the build jobs. |
| 5 | # SrsArmMakeOptions: the arm make options for ubuntu12(armhf, v7cpu) | 5 | # SrsArmMakeOptions: the arm make options for ubuntu12(armhf, v7cpu) |
| 6 | +# SRS_AUTO_HEADERS_H: the auto generated header file. | ||
| 6 | 7 | ||
| 7 | ##################################################################################### | 8 | ##################################################################################### |
| 8 | ##################################################################################### | 9 | ##################################################################################### |
| @@ -542,3 +543,6 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | @@ -542,3 +543,6 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 542 | else | 543 | else |
| 543 | echo "#undef SRS_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H | 544 | echo "#undef SRS_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H |
| 544 | fi | 545 | fi |
| 546 | + | ||
| 547 | +# new empty line to auto headers file. | ||
| 548 | +echo "" >> $SRS_AUTO_HEADERS_H |
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | +# variables, parent script must set it: | ||
| 4 | +# SRS_AUTO_HEADERS_H: the auto generated header file. | ||
| 5 | + | ||
| 3 | ##################################################################################### | 6 | ##################################################################################### |
| 4 | ##################################################################################### | 7 | ##################################################################################### |
| 5 | # parse user options, do this at first | 8 | # parse user options, do this at first |
| @@ -19,6 +19,7 @@ BLACK="\\e[0m" | @@ -19,6 +19,7 @@ BLACK="\\e[0m" | ||
| 19 | # srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST | 19 | # srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST |
| 20 | # build options: SRS_JOBS | 20 | # build options: SRS_JOBS |
| 21 | ##################################################################################### | 21 | ##################################################################################### |
| 22 | +SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" | ||
| 22 | # parse options, exit with error when parse options invalid. | 23 | # parse options, exit with error when parse options invalid. |
| 23 | . auto/options.sh | 24 | . auto/options.sh |
| 24 | 25 | ||
| @@ -28,15 +29,18 @@ if [[ -f Makefile ]]; then | @@ -28,15 +29,18 @@ if [[ -f Makefile ]]; then | ||
| 28 | make clean | 29 | make clean |
| 29 | fi | 30 | fi |
| 30 | 31 | ||
| 31 | -##################################################################################### | ||
| 32 | -# generate auto headers file, depends on the finished of options.sh | ||
| 33 | -##################################################################################### | ||
| 34 | # write user options to headers | 32 | # write user options to headers |
| 35 | -SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" | ||
| 36 | -echo "#define SRS_CONFIGURE \"${SRS_CONFIGURE}\"" > $SRS_AUTO_HEADERS_H | ||
| 37 | -echo "#define SRS_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H | ||
| 38 | echo "#define SRS_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H | 33 | echo "#define SRS_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H |
| 34 | +echo "#define SRS_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H | ||
| 35 | +echo "#define SRS_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H | ||
| 36 | +echo "#define SRS_CONFIGURE \"${SRS_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H | ||
| 37 | + | ||
| 38 | +# new empty line to auto headers file. | ||
| 39 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 39 | 40 | ||
| 41 | +##################################################################################### | ||
| 42 | +# generate auto headers file, depends on the finished of options.sh | ||
| 43 | +##################################################################################### | ||
| 40 | # the arm-ubuntu12 options for make for depends | 44 | # the arm-ubuntu12 options for make for depends |
| 41 | SrsArmCC="arm-linux-gnueabi-gcc" | 45 | SrsArmCC="arm-linux-gnueabi-gcc" |
| 42 | SrsArmGCC="arm-linux-gnueabi-gcc" | 46 | SrsArmGCC="arm-linux-gnueabi-gcc" |
| @@ -48,9 +52,6 @@ SrsArmRANDLIB="arm-linux-gnueabi-ranlib" | @@ -48,9 +52,6 @@ SrsArmRANDLIB="arm-linux-gnueabi-ranlib" | ||
| 48 | # apply user options. | 52 | # apply user options. |
| 49 | . auto/depends.sh | 53 | . auto/depends.sh |
| 50 | 54 | ||
| 51 | -# new empty line to auto headers file. | ||
| 52 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 53 | - | ||
| 54 | ##################################################################################### | 55 | ##################################################################################### |
| 55 | # generate Makefile. | 56 | # generate Makefile. |
| 56 | ##################################################################################### | 57 | ##################################################################################### |
| @@ -81,6 +81,10 @@ int main(int argc, char** argv) | @@ -81,6 +81,10 @@ int main(int argc, char** argv) | ||
| 81 | #endif | 81 | #endif |
| 82 | #endif | 82 | #endif |
| 83 | 83 | ||
| 84 | + srs_trace("uname: "SRS_UNAME); | ||
| 85 | + srs_trace("build: %s, %s", SRS_BUILD_DATE, srs_is_little_endian()? "little-endian":"big-endian"); | ||
| 86 | + srs_trace("configure: "SRS_CONFIGURE); | ||
| 87 | + | ||
| 84 | if ((ret = _srs_server->initialize()) != ERROR_SUCCESS) { | 88 | if ((ret = _srs_server->initialize()) != ERROR_SUCCESS) { |
| 85 | return ret; | 89 | return ret; |
| 86 | } | 90 | } |
-
请 注册 或 登录 后发表评论