1
0
mirror of https://github.com/Wind4/vlmcsd.git synced 2024-11-25 03:21:03 +08:00
vlmcsd/make_freebsd

38 lines
3.0 KiB
Plaintext
Raw Normal View History

2015-11-29 17:30:52 +08:00
#!/usr/local/bin/bash
export VERBOSE=3
export DNS_PARSER=OS
2016-06-28 13:07:01 +08:00
rm -f vlmcsd-Free* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
2015-11-29 17:30:52 +08:00
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-flto=12 -static-libgcc -pipe -fwhole-program -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 -Wl,--hash-style=gnu -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
2016-06-06 10:36:00 +08:00
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x64-gcc CLIENT_NAME=vlmcs-FreeBSD-10.3-x64-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-gcc CC=gcc5 CFLAGS="$CF" LDFLAGS="$LF"
2016-06-28 13:07:01 +08:00
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x64 CLIENT_NAME=vlmcs-FreeBSD-10.3-x64 PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF" allmulti
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x86 CLIENT_NAME=vlmcs-FreeBSD-10.3-x86 PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
2016-06-06 10:36:00 +08:00
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x86-gcc CLIENT_NAME=vlmcs-FreeBSD-10.3-x86-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-gcc CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.3-x64-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.3-x64-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.3-x86-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.3-x86-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.3-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF"
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.3-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
2015-11-29 17:30:52 +08:00
rm *.o
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-*
2016-08-02 22:39:39 +08:00
sudo cp -af vlmcsd-FreeBSD-10.3-x64-gcc /usr/local/sbin/vlmcsd
sudo cp -af vlmcs-FreeBSD-10.3-x64-gcc /usr/local/bin/vlmcs
2015-11-29 17:30:52 +08:00
# Copy everything to distribution server
2016-06-28 13:07:01 +08:00
scp -p vlmcsdmulti-* vlmcsd-Free* vlmcs-* root@ubuntu64:x/binaries/FreeBSD/intel/