正在显示
4 个修改的文件
包含
35 行增加
和
23 行删除
| @@ -43,29 +43,6 @@ echo "" >> $SRS_AUTO_HEADERS_H | @@ -43,29 +43,6 @@ echo "" >> $SRS_AUTO_HEADERS_H | ||
| 43 | ##################################################################################### | 43 | ##################################################################################### |
| 44 | # generate auto headers file, depends on the finished of options.sh | 44 | # generate auto headers file, depends on the finished of options.sh |
| 45 | ##################################################################################### | 45 | ##################################################################################### |
| 46 | -if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 47 | - __SrsArmCC="arm-linux-gnueabi-gcc"; | ||
| 48 | - __SrsArmGCC="arm-linux-gnueabi-gcc"; | ||
| 49 | - __SrsArmCXX="arm-linux-gnueabi-g++"; | ||
| 50 | - __SrsArmAR="arm-linux-gnueabi-ar"; | ||
| 51 | - __SrsArmLD="arm-linux-gnueabi-ld"; | ||
| 52 | - __SrsArmRANDLIB="arm-linux-gnueabi-ranlib"; | ||
| 53 | -fi | ||
| 54 | -if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 55 | - __SrsArmCC="mipsel-openwrt-linux-gcc"; | ||
| 56 | - __SrsArmGCC="mipsel-openwrt-linux-gcc"; | ||
| 57 | - __SrsArmCXX="mipsel-openwrt-linux-g++"; | ||
| 58 | - __SrsArmAR="mipsel-openwrt-linux-ar"; | ||
| 59 | - __SrsArmLD="mipsel-openwrt-linux-ld"; | ||
| 60 | - __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; | ||
| 61 | -fi | ||
| 62 | -# the arm-ubuntu12 options for make for depends | ||
| 63 | -if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi | ||
| 64 | -if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi | ||
| 65 | -if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi | ||
| 66 | -if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi | ||
| 67 | -if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi | ||
| 68 | -if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi | ||
| 69 | # write to source file | 46 | # write to source file |
| 70 | if [ $SRS_CROSS_BUILD = YES ]; then | 47 | if [ $SRS_CROSS_BUILD = YES ]; then |
| 71 | echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB" | 48 | echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB" |
trunk/auto/setup_variables.sh
0 → 100644
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +# when options parsed, setup some variables, then build the depends. | ||
| 4 | + | ||
| 5 | +# when arm specified, setup the cross build variables. | ||
| 6 | +if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 7 | + __SrsArmCC="arm-linux-gnueabi-gcc"; | ||
| 8 | + __SrsArmGCC="arm-linux-gnueabi-gcc"; | ||
| 9 | + __SrsArmCXX="arm-linux-gnueabi-g++"; | ||
| 10 | + __SrsArmAR="arm-linux-gnueabi-ar"; | ||
| 11 | + __SrsArmLD="arm-linux-gnueabi-ld"; | ||
| 12 | + __SrsArmRANDLIB="arm-linux-gnueabi-ranlib"; | ||
| 13 | +fi | ||
| 14 | + | ||
| 15 | +if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 16 | + __SrsArmCC="mipsel-openwrt-linux-gcc"; | ||
| 17 | + __SrsArmGCC="mipsel-openwrt-linux-gcc"; | ||
| 18 | + __SrsArmCXX="mipsel-openwrt-linux-g++"; | ||
| 19 | + __SrsArmAR="mipsel-openwrt-linux-ar"; | ||
| 20 | + __SrsArmLD="mipsel-openwrt-linux-ld"; | ||
| 21 | + __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; | ||
| 22 | +fi | ||
| 23 | + | ||
| 24 | +# the arm-ubuntu12 options for make for depends | ||
| 25 | +if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi | ||
| 26 | +if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi | ||
| 27 | +if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi | ||
| 28 | +if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi | ||
| 29 | +if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi | ||
| 30 | +if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi |
| @@ -23,6 +23,9 @@ BLACK="\\033[0m" | @@ -23,6 +23,9 @@ BLACK="\\033[0m" | ||
| 23 | # parse options, exit with error when parse options invalid. | 23 | # parse options, exit with error when parse options invalid. |
| 24 | . auto/options.sh | 24 | . auto/options.sh |
| 25 | 25 | ||
| 26 | +# setup variables when options parsed. | ||
| 27 | +. auto/setup_variables.sh | ||
| 28 | + | ||
| 26 | # clean the exists, when not export srs-librtmp. | 29 | # clean the exists, when not export srs-librtmp. |
| 27 | # do this only when the options is ok. | 30 | # do this only when the options is ok. |
| 28 | if [[ -f Makefile ]]; then | 31 | if [[ -f Makefile ]]; then |
| @@ -352,6 +352,7 @@ | @@ -352,6 +352,7 @@ | ||
| 352 | 3C689F9B1AB6AAC800C9CEEE /* sched.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sched.c; path = "../../objs/st-1.9/sched.c"; sourceTree = "<group>"; }; | 352 | 3C689F9B1AB6AAC800C9CEEE /* sched.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sched.c; path = "../../objs/st-1.9/sched.c"; sourceTree = "<group>"; }; |
| 353 | 3C689F9C1AB6AAC800C9CEEE /* stk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stk.c; path = "../../objs/st-1.9/stk.c"; sourceTree = "<group>"; }; | 353 | 3C689F9C1AB6AAC800C9CEEE /* stk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stk.c; path = "../../objs/st-1.9/stk.c"; sourceTree = "<group>"; }; |
| 354 | 3C689F9D1AB6AAC800C9CEEE /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sync.c; path = "../../objs/st-1.9/sync.c"; sourceTree = "<group>"; }; | 354 | 3C689F9D1AB6AAC800C9CEEE /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sync.c; path = "../../objs/st-1.9/sync.c"; sourceTree = "<group>"; }; |
| 355 | + 3CB25C281BB2596300C97A63 /* setup_variables.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = setup_variables.sh; path = ../../../auto/setup_variables.sh; sourceTree = "<group>"; }; | ||
| 355 | 3CC52DCA1ACE4023006FEB01 /* srs_utest_amf0.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_utest_amf0.cpp; path = ../../src/utest/srs_utest_amf0.cpp; sourceTree = "<group>"; }; | 356 | 3CC52DCA1ACE4023006FEB01 /* srs_utest_amf0.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_utest_amf0.cpp; path = ../../src/utest/srs_utest_amf0.cpp; sourceTree = "<group>"; }; |
| 356 | 3CC52DCB1ACE4023006FEB01 /* srs_utest_amf0.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_utest_amf0.hpp; path = ../../src/utest/srs_utest_amf0.hpp; sourceTree = "<group>"; }; | 357 | 3CC52DCB1ACE4023006FEB01 /* srs_utest_amf0.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_utest_amf0.hpp; path = ../../src/utest/srs_utest_amf0.hpp; sourceTree = "<group>"; }; |
| 357 | 3CC52DCC1ACE4023006FEB01 /* srs_utest_config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_utest_config.cpp; path = ../../src/utest/srs_utest_config.cpp; sourceTree = "<group>"; }; | 358 | 3CC52DCC1ACE4023006FEB01 /* srs_utest_config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_utest_config.cpp; path = ../../src/utest/srs_utest_config.cpp; sourceTree = "<group>"; }; |
| @@ -632,6 +633,7 @@ | @@ -632,6 +633,7 @@ | ||
| 632 | 3C1232C31AAE827E00CE8F6C /* local_ip.sh */, | 633 | 3C1232C31AAE827E00CE8F6C /* local_ip.sh */, |
| 633 | 3C1232C41AAE827E00CE8F6C /* modules.sh */, | 634 | 3C1232C41AAE827E00CE8F6C /* modules.sh */, |
| 634 | 3C1232C51AAE827E00CE8F6C /* options.sh */, | 635 | 3C1232C51AAE827E00CE8F6C /* options.sh */, |
| 636 | + 3CB25C281BB2596300C97A63 /* setup_variables.sh */, | ||
| 635 | 3C1232C61AAE827E00CE8F6C /* summary.sh */, | 637 | 3C1232C61AAE827E00CE8F6C /* summary.sh */, |
| 636 | 3C1232C71AAE827E00CE8F6C /* utest.sh */, | 638 | 3C1232C71AAE827E00CE8F6C /* utest.sh */, |
| 637 | ); | 639 | ); |
-
请 注册 或 登录 后发表评论