mirror of
https://github.com/ossrs/srs.git
synced 2025-02-14 20:31:56 +00:00
for #485, support cross build for arm
This commit is contained in:
parent
16730ea031
commit
f6e655396c
4 changed files with 35 additions and 23 deletions
|
@ -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"
|
||||
|
|
30
trunk/auto/setup_variables.sh
Normal file
30
trunk/auto/setup_variables.sh
Normal file
|
@ -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
|
3
trunk/configure
vendored
3
trunk/configure
vendored
|
@ -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
|
||||
|
|
|
@ -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 = "<group>"; };
|
||||
3C689F9C1AB6AAC800C9CEEE /* stk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stk.c; path = "../../objs/st-1.9/stk.c"; sourceTree = "<group>"; };
|
||||
3C689F9D1AB6AAC800C9CEEE /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sync.c; path = "../../objs/st-1.9/sync.c"; sourceTree = "<group>"; };
|
||||
3CB25C281BB2596300C97A63 /* setup_variables.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = setup_variables.sh; path = ../../../auto/setup_variables.sh; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
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 @@
|
|||
3C1232C31AAE827E00CE8F6C /* local_ip.sh */,
|
||||
3C1232C41AAE827E00CE8F6C /* modules.sh */,
|
||||
3C1232C51AAE827E00CE8F6C /* options.sh */,
|
||||
3CB25C281BB2596300C97A63 /* setup_variables.sh */,
|
||||
3C1232C61AAE827E00CE8F6C /* summary.sh */,
|
||||
3C1232C71AAE827E00CE8F6C /* utest.sh */,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue