OpenSSH交叉编译

来源:互联网 发布:猫娘计划 知乎 编辑:程序博客网 时间:2024/05/16 04:39


#!/bin/shHOST=arm-linux-gnueabihfCC=$HOST-gccCPP=$HOST-g++AR=$HOST-arLD=$HOST-ldNM=$HOST-nmRANLIB=$HOST-ranlibSTRIP=$HOST-stripINSTALL=`pwd`/../installfunction make_zlib(){app=zlib-1.2.8if ! [ -d $app ]; thentar -xvf $app.tar.gzficd $app./configure --prefix=`pwd`/../install/zlib --staticmake cleanmake CC=$CC AR=$AR CFLAGS="-O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN"make installcd -}function make_openssli110(){app=openssl-1.1.0if ! [ -d $app ]; thentar -xvf $app.tar.gzficd $app./config --prefix=`pwd`/../install/openssl no-asm### sed -i "" 's|\"iphoneos-cross\"\,\"llvm-gcc\:-O3|\"iphoneos-cross\"\,\"clang\:-Os|g' Configure### sed -i "" 's/CC= cc/CC= clang/g' Makefile.org### sed -i "" 's/CFLAG= -O/CFLAG= -Os/g' Makefile.org### sed -i "" 's/MAKEDEPPROG=makedepend/MAKEDEPPROG=$(CC) -M/g' Makefile.orgsed -i 's/\-m64/ /g' Makefilemake cleanmake CROSS_COMPILE=$HOST-### make CC=$CC AR=$AR RANLIB=$RANLIBmake installcd -}function make_openssl(){app=openssl-1.0.2hif ! [ -d $app ]; thentar -xvf $app.tar.gzficd $app./config --prefix=`pwd`/../install/openssl no-asm no-shared -fPIC### sed -i "" 's|\"iphoneos-cross\"\,\"llvm-gcc\:-O3|\"iphoneos-cross\"\,\"clang\:-Os|g' Configure### sed -i "" 's/CC= cc/CC= clang/g' Makefile.org### sed -i "" 's/CFLAG= -O/CFLAG= -Os/g' Makefile.org### sed -i "" 's/MAKEDEPPROG=makedepend/MAKEDEPPROG=$(CC) -M/g' Makefile.orgsed -i 's/\-m64/ /g' Makefilemake clean### make CROSS_COMPILE=$HOST-make CC=$CC AR="$AR r" RANLIB=$RANLIBmake installcd -}function make_openssh(){app=openssh-7.3p1if ! [ -d $app ]; thentar -xvf $app.tar.gzficd $app#./configure --host=$HOST --prefix=`pwd`/../install/openssh --with-zlib=`pwd`/../install/zlib --with-ssl-dir=`pwd`/../install/openssl --without-shadow --disable-etc-default-login./configure --host=$HOST --with-zlib=`pwd`/../install/zlib --with-ssl-dir=`pwd`/../install/openssl --without-shadow --disable-etc-default-loginmake cleanmake#make installcd -}function make_install(){}#make_zlib#make_openssl#make_opensshmake_install




0 0
原创粉丝点击