2015-11-29 17:30:52 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-08-15 18:35:59 +08:00
|
|
|
export VLMCSD_VERSION="svn`svnversion`"
|
2015-11-29 17:30:52 +08:00
|
|
|
export VERBOSE=3
|
|
|
|
export DNS_PARSER=OS
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd "$( dirname "$0" )"
|
|
|
|
make -C .. clean
|
2015-11-29 17:30:52 +08:00
|
|
|
|
2016-06-06 10:36:00 +08:00
|
|
|
MAKEFLAGS="-Bj"
|
2015-11-29 17:30:52 +08:00
|
|
|
REUSEOBJFLAGS="-j"
|
|
|
|
CFGCC="-static-libgcc -mdynamic-no-pic -Os -flto=jobserver -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
|
|
|
CFCLANG="-mdynamic-no-pic -Os -flto -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
|
|
|
CFGCC42="-static-libgcc -mdynamic-no-pic -Os -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd ../src
|
|
|
|
BINDIR="../bin"
|
|
|
|
|
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x86 CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x86 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
|
|
|
|
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
|
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x64 CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x64 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
|
|
|
|
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
|
2016-04-11 12:49:47 +08:00
|
|
|
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.4" && \
|
|
|
|
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.4" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
#make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-7.1-armv7 PROGRAM_NAME=vlmcsd-iOS-7.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" && \
|
2016-06-28 13:07:01 +08:00
|
|
|
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
2015-11-29 17:30:52 +08:00
|
|
|
#make $REUSEOBJFLAGS vlmcsdmulti-iOS-7.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-7.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" && \
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-armv7 CLIENT_NAME=$BINDIR/vlmcs-iOS-armv7 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
|
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-armv8-aarch64 CLIENT_NAME=$BINDIR/vlmcs-iOS-armv8-aarch64 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-6.1-armv7 CLIENT_NAME=$BINDIR/vlmcs-iOS-6.1-armv7 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-5.1-armv7-clang3.4 CLIENT_NAME=$BINDIR/vlmcs-iOS-5.1-armv7-clang3.4 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
#PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH clang --version
|
2016-10-14 13:28:23 +08:00
|
|
|
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-5.1-armv6-clang3.1 CLIENT_NAME=$BINDIR/vlmcs-iOS-5.1-armv6-clang3.1 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
2016-04-11 12:49:47 +08:00
|
|
|
#PATH=~/toolchains/gcc4.2/usr/bin/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-4.1-armv6-llvm-gcc4.2 PROGRAM_NAME=vlmcsd-iOS-4.1-armv6-llvm-gcc4.2 CC=llvm-g++-4.2 CFLAGS="$CFGCC42" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS4.1.sdk -isysroot ~/toolchains/iPhoneOS4.1.sdk" && \
|
|
|
|
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
|
|
|
#PATH=~/toolchains/gcc4.2/usr/bin/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-4.1-armv6-llvm-gcc4.2 MULTI_NAME=vlmcsdmulti-iOS-4.1-armv6-llvm-gcc4.2 CC=llvm-g++-4.2 CFLAGS="$CFGCC42" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS4.1.sdk -isysroot ~/toolchains/iPhoneOS4.1.sdk" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
#PATH=~/toolchains/gcc4.2/usr/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-4.1-armv7-clang PROGRAM_NAME=vlmcsd-iOS-4.1-armv7-llvm-clang CC=~/toolchains/gcc4.2/usr/bin/bin/clang CFLAGS="$CFGCC42" PLATFORMFLAGS="-mthumb -arch armv7 -miphoneos-version-min=4.1 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk" && \
|
|
|
|
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o && \
|
|
|
|
#PATH=~/toolchains/gcc4.2/usr/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-4.1-armv7-llvm-clang MULTI_NAME=vlmcsdmulti-iOS-4.1-armv7-llvm-clang CC=~/toolchains/gcc4.2/usr/bin/bin/clang CFLAGS="$CFGCC42" PLATFORMFLAGS="-mthumb -arch armv7 -miphoneos-version-min=4.1 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk" && \
|
|
|
|
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj allmulti SAFE_MODE=1 MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-ppc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-ppc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
|
|
|
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-threads-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
|
|
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
|
|
|
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-threads-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
# Sign the iOS binaries
|
|
|
|
#ldid -S *iOS*
|
|
|
|
|
|
|
|
#strip vlmcs-* vlmcsd-* vlmcsdmulti-*
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd $BINDIR
|
|
|
|
MANDIR="../man"
|
|
|
|
|
2015-11-29 17:30:52 +08:00
|
|
|
rm -fr *.dSYM
|
|
|
|
|
|
|
|
sudo cp -p vlmcs-MacOSX-x86-gcc /usr/local/bin/vlmcs
|
|
|
|
sudo cp -p vlmcsd-MacOSX-x86-gcc /usr/local/bin/vlmcsd
|
|
|
|
|
|
|
|
sudo mkdir -p /usr/local/share/man/man8
|
|
|
|
sudo mkdir -p /usr/local/share/man/man1
|
|
|
|
sudo mkdir -p /usr/local/share/man/man7
|
|
|
|
sudo mkdir -p /usr/local/share/man/man5
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
sudo cp -p $MANDIR/vlmcsd.8 /usr/local/share/man/man8
|
|
|
|
sudo cp -p $MANDIR/vlmcs.1 $MANDIR/vlmcsdmulti.1 /usr/local/share/man/man1
|
|
|
|
sudo cp -p $MANDIR/vlmcsd-floppy.7 $MANDIR/vlmcsd.7 /usr/local/share/man/man7
|
|
|
|
sudo cp -p $MANDIR/vlmcsd.ini.5 //usr/local/share/man/man5
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
# Copy the stuff to distribution server
|
|
|
|
scp -p vlmcsd-MacOSX-x* vlmcs-MacOSX-x* vlmcsdmulti-MacOSX-x* root@ubuntu64:x/binaries/MacOSX/intel
|
|
|
|
scp -p vlmcsd-MacOSX-ppc* vlmcs-MacOSX-ppc* vlmcsdmulti-MacOSX-ppc* root@ubuntu64:x/binaries/MacOSX/ppc
|
|
|
|
scp -p vlmcsd-iOS* vlmcs-iOS* vlmcsdmulti-iOS* root@ubuntu64:x/binaries/iOS/arm
|