7 local green="\033[1;32m"
9 echo "[${green}build${normal}] $1"
14 SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
21 Build vlc in the current directory
26 -k <sdk> Use the specified sdk (default: $SDKROOT)
27 -a <arch> Use the specified arch (default: $ARCH)
34 pushd "$1" > /dev/null
42 while getopts "hvk:a:" OPTION
61 shift $(($OPTIND - 1))
63 if [ "x$1" != "x" ]; then
69 # Various initialization
73 if [ "$QUIET" = "yes" ]; then
77 info "Building VLC for the Mac OS X"
79 spushd `dirname $0`/../../..
85 info "Building in \"$builddir\""
87 export CC="xcrun clang"
88 export CXX="xcrun clang++"
89 export OBJC="xcrun clang"
92 export PATH="${vlcroot}/extras/tools/build/bin:$PATH"
94 TRIPLET=$ARCH-apple-darwin10
101 info "Building building tools"
102 spushd "${vlcroot}/extras/tools"
112 info "Building contribs"
113 spushd "${vlcroot}/contrib"
114 mkdir -p build && cd build
115 ../bootstrap --build=$TRIPLET --host=$TRIPLET > $out
116 if [ ! -e "../$TRIPLET" ]; then
126 info "Bootstrap-ing configure"
128 if ! [ -e "${vlcroot}/configure" ]; then
129 ${vlcroot}/bootstrap > $out
138 if [ "${vlcroot}/configure" -nt Makefile ]; then
140 ${vlcroot}/extras/package/macosx/configure.sh \
143 --with-macosx-version-min=$OSX_VERSION \
144 --with-macosx-sdk=$SDKROOT > $out
152 core_count=`sysctl -n machdep.cpu.core_count`
153 let jobs=$core_count+1
155 info "Running make -j$jobs"