2015-11-29 10:30:52 +01:00
|
|
|
#!/usr/local/bin/bash
|
|
|
|
|
2016-08-15 12:35:59 +02:00
|
|
|
export VLMCSD_VERSION="svn`svnversion`"
|
2015-11-29 10:30:52 +01:00
|
|
|
export VERBOSE=3
|
|
|
|
export DNS_PARSER=OS
|
|
|
|
|
2016-10-14 07:28:23 +02:00
|
|
|
cd "$( dirname "$0" )"
|
|
|
|
gmake -C .. clean
|
|
|
|
|
|
|
|
cd ../src
|
|
|
|
BINDIR="../bin"
|
2015-11-29 10:30:52 +01:00
|
|
|
|
|
|
|
MAKEFLAGS="-B -j12"
|
|
|
|
REUSEOBJFLAGS="-j12"
|
|
|
|
|
|
|
|
CF="-static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
|
|
|
CF45="-static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
|
|
|
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
|
|
|
LF="-Wl,-z,norelro"
|
|
|
|
LFCLANG="-Wl,-z,norelro"
|
|
|
|
|
2016-10-14 07:28:23 +02:00
|
|
|
gmake -Bj12 allmulti $MAKEFLAGS CC=egcc MULTI_NAME=$BINDIR/vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=$BINDIR/vlmcsd-OpenBSD-x64 CLIENT_NAME=$BINDIR/vlmcs-OpenBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
|
2015-11-29 10:30:52 +01:00
|
|
|
|
|
|
|
#gmake allmulti $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-OpenBSD-x86 PROGRAM_NAME=vlmcsd-OpenBSD-x86 CLIENT_NAME=vlmcs-OpenBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
|
|
|
|
|
|
|
|
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-OpenBSD-x64-clang CLIENT_NAME=vlmcs-OpenBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
|
|
|
|
|
2016-10-14 07:28:23 +02:00
|
|
|
cd $BINDIR
|
2015-11-29 10:30:52 +01:00
|
|
|
|
|
|
|
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
|
|
|
|
#sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
|
|
|
|
|
|
|
|
cp -f vlmcsd-OpenBSD-x64 /usr/local/sbin/vlmcsd
|
|
|
|
cp -f vlmcs-OpenBSD-x64 /usr/local/bin/vlmcs
|
|
|
|
|
|
|
|
# Copy everything to distribution server
|
2016-06-28 07:07:01 +02:00
|
|
|
scp -p vlmcsdmulti-* vlmcsd-Open* vlmcs-* root@ubuntu64:x/binaries/OpenBSD/intel/
|