-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmake-iphone
66 lines (60 loc) · 2.37 KB
/
make-iphone
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
THIS_DIR=`pwd`
SHARED_CONFIG_FLAGS="--without-profile \
--without-cmp \
--without-asdf \
--without-defsystem \
--enable-debug \
--disable-shared \
--without-serve-event \
--with-tcp \
--without-rt \
--enable-threads \
--without-gmp"
echo "=================================================="
echo "Making the build-platform ECL to be used for cross compilation:"
echo "=================================================="
make distclean
DEVROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer
./configure $SHARED_CONFIG_FLAGS \
--prefix=$THIS_DIR/install_iPhoneSimulator/ \
CC="$DEVROOT/usr/bin/gcc" \
AR=$DEVROOT/usr/bin/ar \
RANLIB=$DEVROOT/usr/bin/ranlib \
NM=$DEVROOT/usr/bin/nm \
CPP=$DEVROOT/usr/bin/cpp \
ac_cv_path_NM=$DEVROOT/usr/bin/nm \
dynamic_ffi=no
make
make install
chmod -R 775 ./install_iPhoneSimulator/lib/
echo "=================================================="
echo "Making the host-platform ECL to be used on the iPhone:"
echo "=================================================="
make distclean
mkdir build
cp cross_config_iPhoneOS build/cross_config
echo "ECL_TO_RUN=$THIS_DIR/install_iPhoneSimulator/bin/ecl" >> build/cross_config
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
sh ./configure $SHARED_CONFIG_FLAGS \
--prefix=$THIS_DIR/install_iPhoneOS/ \
--host=arm-apple-darwin \
--target=arm-apple \
CC="$DEVROOT/usr/bin/gcc-4.0 -arch armv6" \
AR=$DEVROOT/usr/bin/ar \
RANLIB=$DEVROOT/usr/bin/ranlib \
NM=$DEVROOT/usr/bin/nm \
CFLAGS="-arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -miphoneos-version-min=2.0 -I/Library/iPhone/include -isysroot $DEVROOT/SDKs/iPhoneOS2.0.sdk" \
LDFLAGS="-arch armv6 -pipe -std=c99 -gdwarf-2 -I/Library/iPhone/include -isysroot $DEVROOT/SDKs/iPhoneOS2.0.sdk" \
CPP=$DEVROOT/usr/bin/cpp \
ac_cv_path_NM=$DEVROOT/usr/bin/nm \
ac_cv_func_setpgrp_void=yes \
LIBPOSTFIX=_iPhoneOS \
dynamic_ffi=no
make
make install
echo "Renaming library files"
cp install_iPhoneOS/lib/libecl.a install_iPhoneOS/lib/libecl_iPhoneOS.a && cp install_iPhoneOS/lib/libeclgc.a install_iPhoneOS/lib/libeclgc_iPhoneOS.a
echo "=================================================="
echo "Finished compiling! Inspect the output for errors"
echo "=================================================="