7 local green="\033[1;32m"
9 echo "[${green}build${normal}] $1"
20 Build vlc in the current directory
25 -k <sdk> Use the specified sdk (default: $SDK)
26 -a <arch> Use the specified arch (default: $ARCH)
33 pushd "$1" > /dev/null
41 while getopts "hvk:a:" OPTION
60 shift $(($OPTIND - 1))
62 if [ "x$1" != "x" ]; then
68 # Various initialization
72 if [ "$QUIET" = "yes" ]; then
76 info "Building VLC for the Mac OS X"
78 spushd `dirname $0`/../../..
84 info "Building in \"$builddir\""
86 export CC=/Developer/usr/bin/clang
87 export CXX="/Developer/usr/bin/clang++"
88 export OBJC=/Developer/usr/bin/clang
89 export OSX_VERSION=$SDK
90 export PATH="${vlcroot}/extras/tools/build/bin:$PATH"
92 TRIPLET=$ARCH-apple-darwin10
99 info "Building building tools"
100 spushd "${vlcroot}/extras/tools"
110 info "Building contribs"
111 spushd "${vlcroot}/contrib"
112 mkdir -p build && cd build
113 ../bootstrap --build=$TRIPLET --host=$TRIPLET > $out
114 if [ ! -e "../$TRIPLET" ]; then
124 info "Bootstrap-ing configure"
126 if ! [ -e "${vlcroot}/configure" ]; then
127 ${vlcroot}/bootstrap > $out
136 if [ "${vlcroot}/configure" -nt Makefile ]; then
138 ${vlcroot}/extras/package/macosx/configure.sh \
141 --with-macosx-version-min=$OSX_VERSION \
142 --with-macosx-sdk=/Developer/SDKs/MacOSX$OSX_VERSION.sdk > $out
150 core_count=`sysctl -n machdep.cpu.core_count`
151 let jobs=$core_count+1
153 info "Running make -j$jobs"