add environment.sh to create initial build directory, and set common env var
KIVYIOSROOT represent the root of this project. It can be used in external project to refer of this project (like using build/lib directory, or build/include) + change current build_* to copy include and lib in a common build/ directory
This commit is contained in:
parent
1914cfa079
commit
f21b1a61e3
5 changed files with 46 additions and 14 deletions
|
@ -1,11 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
. environment.sh
|
||||
|
||||
FT_VERSION=2.4.8
|
||||
SDKVER=5.0
|
||||
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
|
||||
if [ ! -d freetype-$FT_VERSION ]; then
|
||||
curl -L http://download.savannah.gnu.org/releases/freetype/freetype-$FT_VERSION.tar.bz2 > freetype-$FT_VERSION.tar.bz2
|
||||
|
@ -19,8 +16,10 @@ fi
|
|||
# lib not found, compile it
|
||||
pushd .
|
||||
cd freetype-$FT_VERSION
|
||||
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O2 -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O0 -g -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
make clean
|
||||
make
|
||||
cp objs/.libs/libfreetype.a libfreetype-arm7.a
|
||||
|
||||
# copy to buildroot
|
||||
cp objs/.libs/libfreetype.a $BUILDROOT/lib/libfreetype.a
|
||||
cp -a include $BUILDROOT/include/freetype
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/zsh
|
||||
|
||||
. ./environment.sh
|
||||
|
||||
set -o errexit
|
||||
set -x
|
||||
|
||||
|
@ -164,4 +167,4 @@ lipo $PATH_DEV/lib/libpython2.7-arm.a $PATH_SIMU/lib/libpython2.7-i386.a -create
|
|||
find python2.7 | grep -E '*\.(py|pyc|so\.o|so\.a|so\.libs)$' | xargs rm
|
||||
find python2.7 | grep -E '*test*' | xargs rm -rdf
|
||||
|
||||
|
||||
cp $PATH_DEV/libpython2.7-arm.a $BUILDROOT/build/lib/
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#!/bin/bash
|
||||
. ./environmnent.sh
|
||||
pushd sdl/sdl1.3/Xcode-iPhoneOS/SDL
|
||||
xcodebuild -project SDLiPhoneOS.xcodeproj -alltargets
|
||||
popd
|
||||
#the binarie is under sdl/sdl1.3/Xcode-iPhoneOS/SDL/build/Release-Universal/
|
||||
cp sdl/sdl1.3/Xcode-iPhoneOS/SDL/build/Release-iPhoneOS/libSDL.a $BUILDROOT/lib
|
||||
cp -a sdl/sdl1.3/include $BUILDROOT/include/SDL
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
. environment.sh
|
||||
|
||||
SDLTTF_VERSION=2.0.10
|
||||
SDKVER=5.0
|
||||
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
|
||||
if [ ! -d SDL_ttf-$SDLTTF_VERSION ]; then
|
||||
curl -L http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$SDLTTF_VERSION.tar.gz > SDL_ttf-$SDLTTF_VERSION.tar.gz
|
||||
|
@ -17,12 +14,15 @@ if [ -f SDL_ttf-$SDLTTF_VERSION/libSDL_ttf-arm7.a ]; then
|
|||
fi
|
||||
|
||||
|
||||
cd SDL_ttf-2.0.10
|
||||
cd SDL_ttf-$SDLTTF_VERSION
|
||||
rm libSDL_ttf.la
|
||||
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin \
|
||||
--enable-static=yes --enable-shared=no \
|
||||
--without-x \
|
||||
CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O2 -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O0 -g -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||
make clean
|
||||
make libSDL_ttf.la
|
||||
cp .libs/libSDL_ttf.a libSDL_ttf-arm7.a
|
||||
|
||||
# copy to buildroot
|
||||
cp .libs/libSDL_ttf.a $BUILDROOT/lib/libSDL_ttf.a
|
||||
cp -a SDL_ttf.h $BUILDROOT/include
|
||||
|
|
25
environment.sh
Executable file
25
environment.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
# iOS SDK Environmnent
|
||||
SDKVER=5.0
|
||||
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||
|
||||
# where the build will be located
|
||||
ROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
BUILDROOT="$ROOT/build"
|
||||
|
||||
# for external project
|
||||
export KIVYIOSROOT="$ROOT"
|
||||
|
||||
# create build directory if not found
|
||||
set -x
|
||||
if [ ! -d $BUILDROOT ]; then
|
||||
try mkdir $BUILDROOT
|
||||
try mkdir $BUILDROOT/include
|
||||
try mkdir $BUILDROOT/lib
|
||||
fi
|
Loading…
Reference in a new issue