Compile openswan-2.4.14 for Loongson2F

1> compile gmplib for loongson2f # wget ftp://ftp.gmplib.org/pub/gmp-4.3.1/gmp-4.3.1.tar.gz # # cd gmp-4.3.1 add mipsel-linux-gcc path to PATH env # export PATH=$PATH:/opt/gcc-3.4.6-2f/bin Configure for mipsel-linux # ./configure --build=i686-linux --host=mipsel-linux --prefix=/work/lib/trunk/target/usr/local/ # make # make install 2> compile openswan for loongson2f get openswan 2.4.14 source code from http://www.openswan.org/code/ # cd openswan-2.4.14 Create build script # cat >> build.sh << END #!/bin/bash export C_INCLUDE_PATH=/work/lib/trunk/target/usr/local/include export LIBRARY_PATH=/work/lib/trunk/target/usr/local/lib export LD_LIBRARY_PATH=/work/lib/trunk/target/usr/local/lib export CROSS_COMPILE=mipsel-linux export CC="${CROSS_COMPILE}-gcc" export LD="${CROSS_COMPILE}-ld" export AS="${CROSS_COMPILE}-as" export CPP="${CROSS_COMPILE}-gcc -E" export CXX="${CROSS_COMPILE}-g++" export AR="${CROSS_COMPILE}-ar" export NM="${CROSS_COMPILE}-nm" export STRIP="${CROSS_COMPILE}-strip" export OBJCOPY="${CROSS_COMPILE}-objcopy" export OBJDUMP="${CROSS_COMPILE}-objdump" export DESTDIR=/work/lib/trunk/target export KERNELSRC=/work/usag/trunk/kernel/linux-2.6.27 make programs END # Compile # bash build.sh  

你可能感兴趣的:(bash,Build,Path,include,library,script#)