Skip to content

Commit

Permalink
Add autobuild script for OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
andoma committed Jan 16, 2014
1 parent b037654 commit 5e93311
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 27 deletions.
34 changes: 34 additions & 0 deletions Autobuild/osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
build()
{
which ccache >/dev/null
if [ $? -eq 0 ]; then
echo "Using ccache"
ccache -s
export CCACHE_CPP2=yes
USE_CCACHE="--ccache"
else
USE_CCACHE=""
fi

./configure.osx ${RELEASE} --cleanbuild ${USE_CCACHE}
make ${JARGS} dist
artifact build.osx/Showtime.dmg dmg application/octet-stream Showtime.dmg

}

clean()
{
echo No clean needs to be done
}

deps()
{
echo No deps needs to be done
}

buildenv()
{
echo No buildenv needs to be done
}

eval $OP
29 changes: 3 additions & 26 deletions configure.osx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ CPU=generic
ARCH=`uname -m`
MACOSXTARGET=""
MACOSXSDK=""
CC=cc
CXX=c++

show_help(){
common_help
Expand Down Expand Up @@ -80,37 +82,12 @@ for opt do
esac
done


setup_env "$@"

enable libpthread
enable zlib

#
# c compiler
#
checkcc() {
cat >$TMPDIR/1.c <<EOF
int main() {
return 0;
}
EOF
$CC 2>/dev/null $TMPDIR/1.c -o $TMPDIR/1.bin
}

if [ "x$CC" != "x" ]; then
echo >>${CONFIG_MAK} "CC=$CC"
CC="$CC"
else
CC="cc"
fi

if checkcc; then
echo "Using C compiler: $CC"
else
echo "C compiler ($CC) is not working"
die
fi

#
# Check SDK path and set target version
#
Expand Down
2 changes: 1 addition & 1 deletion support/configure.inc
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ freetype_setup()


(cd ${FREETYPE_BUILD_DIR} && \
CC=${TOOLCHAIN}gcc AR=${TOOLCHAIN}ar RANLIB=${TOOLCHAIN}ranlib \
CC="${CC}" AR=${TOOLCHAIN}ar RANLIB=${TOOLCHAIN}ranlib \
${FREETYPE_SRC_DIR}/configure \
$1 \
--prefix=${EXT_INSTALL_DIR} \
Expand Down

0 comments on commit 5e93311

Please sign in to comment.