2016-06-06 10:36:00 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-08-15 18:35:59 +08:00
|
|
|
export VLMCSD_VERSION="svn`svnversion`"
|
2016-06-06 10:36:00 +08:00
|
|
|
SMALLCC="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
|
|
|
SMALLLD="-pipe -Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
|
|
|
|
SMALL="$SMALLCC $SMALLLD"
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd "$( dirname "$0" )"
|
|
|
|
gmake -C .. clean
|
|
|
|
|
|
|
|
BINDIR="../bin"
|
|
|
|
MANDIR="../man"
|
|
|
|
cd ../src
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
## IBM S/390
|
|
|
|
|
|
|
|
export CFLAGS="$SMALLCC"
|
|
|
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m31 -mesa -mpacked-stack -msmall-exec"
|
|
|
|
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
|
|
|
export THREADS=0
|
|
|
|
export FEATURES=full
|
|
|
|
export CC=s390x-linux-gnu-gcc
|
|
|
|
export VERBOSE=3
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-s390-glibc
|
|
|
|
export CLIENT_NAME=$BINDIR/vlmcs-s390-glibc
|
|
|
|
export PROGRAM_NAME=$BINDIR/vlmcsd-s390-glibc
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
make -B -j`nproc` allmulti
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
|
2016-10-14 13:28:23 +08:00
|
|
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-s390x-glibc
|
|
|
|
export CLIENT_NAME=$BINDIR/vlmcs-s390x-glibc
|
|
|
|
export PROGRAM_NAME=$BINDIR/vlmcsd-s390x-glibc
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
make -B -j`nproc` allmulti
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
|
2016-06-06 10:36:00 +08:00
|
|
|
## SPARC64
|
|
|
|
|
|
|
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mcpu=v7"
|
|
|
|
export LDFLAGS="$SMALLLD"
|
|
|
|
export CC=sparc64-linux-gnu-gcc
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-sparc64v9-glibc
|
|
|
|
export CLIENT_NAME=$BINDIR/vlmcs-sparc64v9-glibc
|
|
|
|
export PROGRAM_NAME=$BINDIR/vlmcsd-sparc64v9-glibc
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
make -B -j`nproc` allmulti
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
|
2016-06-06 10:36:00 +08:00
|
|
|
## MIPS64 BIG-ENDIAN
|
|
|
|
|
|
|
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
|
|
|
|
export LDFLAGS="$SMALLLD"
|
|
|
|
export CC=mips64-linux-gnuabi64-gcc
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64-glibc
|
|
|
|
export CLIENT_NAME=$BINDIR/vlmcs-mips64-glibc
|
|
|
|
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64-glibc
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
make -B -j`nproc` allmulti
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
2016-10-14 13:28:23 +08:00
|
|
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64mm-glibc
|
|
|
|
export CLIENT_NAME=$BINDIR/vlmcs-mips64mm-glibc
|
|
|
|
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64mm-glibc
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
make -B -j`nproc` allmulti
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## MIPS64 LITTLE-ENDIAN
|
|
|
|
|
|
|
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
|
|
|
|
export LDFLAGS="$SMALLLD"
|
|
|
|
export CC=mips64el-linux-gnuabi64-gcc
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64el-glibc
|
|
|
|
export CLIENT_NAME=$BINDIR/vlmcs-mips64el-glibc
|
|
|
|
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64el-glibc
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
make -B -j`nproc` allmulti
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
2016-10-14 13:28:23 +08:00
|
|
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64elmm-glibc
|
|
|
|
export CLIENT_NAME=$BINDIR/vlmcs-mips64elmm-glibc
|
|
|
|
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64elmm-glibc
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-06-28 13:07:01 +08:00
|
|
|
make -B -j`nproc` allmulti
|
2016-06-06 10:36:00 +08:00
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd $BINDIR
|
|
|
|
sstrip -z *
|
2016-06-06 10:36:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$1" == "nocopy" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd $MANDIR
|
|
|
|
|
2016-06-06 10:36:00 +08:00
|
|
|
mkdir -p /usr/local/man/man1 2>/dev/null
|
|
|
|
mkdir -p /usr/local/man/man5 2>/dev/null
|
|
|
|
mkdir -p /usr/local/man/man8 2>/dev/null
|
|
|
|
mkdir -p /usr/local/man/man7 2>/dev/null
|
|
|
|
cp -a vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
|
|
|
|
cp -a vlmcsd.7 /usr/local/man/man7/
|
|
|
|
cp -a vlmcsd.8 /usr/local/man/man8/
|
|
|
|
cp -a vlmcsd.ini.5 /usr/local/man/man5/
|
|
|
|
pbzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd $BINDIR
|
|
|
|
|
2016-06-06 10:36:00 +08:00
|
|
|
scp -p vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc ubuntu64.internal:x/binaries/Linux/s390/glibc
|
|
|
|
scp -p vlmcsdmulti-sparc64v9-glibc vlmcs-sparc64v9-glibc vlmcsd-sparc64v9-glibc ubuntu64.internal:x/binaries/Linux/sparc/glibc
|
|
|
|
scp -p vlmcsdmulti-mips64-glibc vlmcs-mips64-glibc vlmcsd-mips64-glibc vlmcsdmulti-mips64mm-glibc vlmcs-mips64mm-glibc vlmcsd-mips64mm-glibc ubuntu64.internal:x/binaries/Linux/mips/big-endian/glibc
|
|
|
|
scp -p vlmcsdmulti-mips64el-glibc vlmcs-mips64el-glibc vlmcsd-mips64el-glibc vlmcsdmulti-mips64elmm-glibc vlmcs-mips64elmm-glibc vlmcsd-mips64elmm-glibc ubuntu64.internal:x/binaries/Linux/mips/little-endian/glibc
|
|
|
|
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc s390:vlmcsd
|
|
|
|
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcsdmulti-s390x-glibc s390:/usr/local/sbin
|