diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index 835e68683c..1174ce9b9c 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -43,29 +43,6 @@ echo "" >> $SRS_AUTO_HEADERS_H ##################################################################################### # generate auto headers file, depends on the finished of options.sh ##################################################################################### -if [ $SRS_ARM_UBUNTU12 = YES ]; then - __SrsArmCC="arm-linux-gnueabi-gcc"; - __SrsArmGCC="arm-linux-gnueabi-gcc"; - __SrsArmCXX="arm-linux-gnueabi-g++"; - __SrsArmAR="arm-linux-gnueabi-ar"; - __SrsArmLD="arm-linux-gnueabi-ld"; - __SrsArmRANDLIB="arm-linux-gnueabi-ranlib"; -fi -if [ $SRS_MIPS_UBUNTU12 = YES ]; then - __SrsArmCC="mipsel-openwrt-linux-gcc"; - __SrsArmGCC="mipsel-openwrt-linux-gcc"; - __SrsArmCXX="mipsel-openwrt-linux-g++"; - __SrsArmAR="mipsel-openwrt-linux-ar"; - __SrsArmLD="mipsel-openwrt-linux-ld"; - __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; -fi -# the arm-ubuntu12 options for make for depends -if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi -if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi -if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi -if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi -if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi -if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi # write to source file if [ $SRS_CROSS_BUILD = YES ]; then echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB" diff --git a/trunk/auto/setup_variables.sh b/trunk/auto/setup_variables.sh new file mode 100644 index 0000000000..d1d643b4ff --- /dev/null +++ b/trunk/auto/setup_variables.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# when options parsed, setup some variables, then build the depends. + +# when arm specified, setup the cross build variables. +if [ $SRS_ARM_UBUNTU12 = YES ]; then + __SrsArmCC="arm-linux-gnueabi-gcc"; + __SrsArmGCC="arm-linux-gnueabi-gcc"; + __SrsArmCXX="arm-linux-gnueabi-g++"; + __SrsArmAR="arm-linux-gnueabi-ar"; + __SrsArmLD="arm-linux-gnueabi-ld"; + __SrsArmRANDLIB="arm-linux-gnueabi-ranlib"; +fi + +if [ $SRS_MIPS_UBUNTU12 = YES ]; then + __SrsArmCC="mipsel-openwrt-linux-gcc"; + __SrsArmGCC="mipsel-openwrt-linux-gcc"; + __SrsArmCXX="mipsel-openwrt-linux-g++"; + __SrsArmAR="mipsel-openwrt-linux-ar"; + __SrsArmLD="mipsel-openwrt-linux-ld"; + __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; +fi + +# the arm-ubuntu12 options for make for depends +if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi +if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi +if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi +if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi +if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi +if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi diff --git a/trunk/configure b/trunk/configure index 9534a6cdcf..4332b5d6b5 100755 --- a/trunk/configure +++ b/trunk/configure @@ -23,6 +23,9 @@ BLACK="\\033[0m" # parse options, exit with error when parse options invalid. . auto/options.sh +# setup variables when options parsed. +. auto/setup_variables.sh + # clean the exists, when not export srs-librtmp. # do this only when the options is ok. if [[ -f Makefile ]]; then diff --git a/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.pbxproj b/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.pbxproj index a9b9fd3724..0e87334284 100644 --- a/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.pbxproj +++ b/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.pbxproj @@ -352,6 +352,7 @@ 3C689F9B1AB6AAC800C9CEEE /* sched.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sched.c; path = "../../objs/st-1.9/sched.c"; sourceTree = ""; }; 3C689F9C1AB6AAC800C9CEEE /* stk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stk.c; path = "../../objs/st-1.9/stk.c"; sourceTree = ""; }; 3C689F9D1AB6AAC800C9CEEE /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sync.c; path = "../../objs/st-1.9/sync.c"; sourceTree = ""; }; + 3CB25C281BB2596300C97A63 /* setup_variables.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = setup_variables.sh; path = ../../../auto/setup_variables.sh; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 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 = ""; }; @@ -632,6 +633,7 @@ 3C1232C31AAE827E00CE8F6C /* local_ip.sh */, 3C1232C41AAE827E00CE8F6C /* modules.sh */, 3C1232C51AAE827E00CE8F6C /* options.sh */, + 3CB25C281BB2596300C97A63 /* setup_variables.sh */, 3C1232C61AAE827E00CE8F6C /* summary.sh */, 3C1232C71AAE827E00CE8F6C /* utest.sh */, );