File tree Expand file tree Collapse file tree 3 files changed +30
-10
lines changed Expand file tree Collapse file tree 3 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
set -e
3
+ set -x
3
4
4
5
info ()
5
6
{
@@ -17,10 +18,10 @@ ANDROID_ARCH=arm
17
18
18
19
# TODO: configure to compile specify 3rd party libraries
19
20
OPTIONS="
20
- --disable -lua
21
- --disable -freetype2
21
+ --enable -lua
22
+ --enable -freetype2
22
23
--enable-png
23
- --disable -zlib
24
+ --enable -zlib
24
25
"
25
26
26
27
usage ()
@@ -34,6 +35,7 @@ OPTIONS:
34
35
-k <sdk> Use the specified Android API level (default: $ANDROID_API )
35
36
-a <arch> Use the specified arch (default: $ANDROID_ABI )
36
37
-n <version> Use the gcc version(default: $ANDROID_GCC_VERSION )
38
+ -l <libname> Use the specified library name
37
39
EOF
38
40
}
39
41
@@ -47,7 +49,7 @@ spopd()
47
49
popd > /dev/null
48
50
}
49
51
50
- while getopts " hvk:a:" OPTION
52
+ while getopts " hvk:a:l: " OPTION
51
53
do
52
54
case $OPTION in
53
55
h)
57
59
q)
58
60
set +x
59
61
QUIET=" yes"
60
- ;;
62
+ ;;
61
63
a)
62
64
ANDROID_ABI=$OPTARG
63
- ;;
65
+ ;;
64
66
k)
65
67
ANDROID_API=$OPTARG
66
- ;;
68
+ ;;
67
69
n)
68
70
ANDROID_GCC_VERSION=$OPTARG
69
- ;;
71
+ ;;
72
+ l)
73
+ OPTIONS=--enable-$OPTARG
74
+ ;;
70
75
esac
71
76
done
72
77
@@ -106,8 +111,8 @@ cocos_root=`pwd`/../..
106
111
107
112
export ANDROID_ABI
108
113
export ANDROID_API
109
- export LDFLAGS=" -L${ANDROID_NDK} /platforms/${ANDROID_API} /arch-${ANDROID_ARCH} /usr/lib"
110
- info " LD FLAGS SELECTED = '${LDFLAGS} '"
114
+ # export LDFLAGS="-L${ANDROID_NDK}/platforms/${ANDROID_API}/arch-${ANDROID_ARCH}/usr/lib"
115
+ # info "LD FLAGS SELECTED = '${LDFLAGS}'"
111
116
112
117
export PATH=" ${toolchain_bin} :${cocos_root} /extras/tools/bin:$PATH "
113
118
#
Original file line number Diff line number Diff line change 203
203
204
204
echo " EXTRA_CFLAGS += ${EXTRA_CFLAGS} " >> config.mak
205
205
echo " EXTRA_LDFLAGS += ${EXTRA_LDFLAGS} " >> config.mak
206
+ echo " IOS_ARCH := ${ARCH} " >> config.mak
206
207
make fetch
207
208
make list
208
209
make
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ ifdef HAVE_ANDROID
22
22
OPENSSL_COMPILER =os/compiler:$(HOST )
23
23
endif
24
24
25
+ ifeq ($(IOS_ARCH ) ,armv7)
26
+ OPENSSL_CONFIG_VARS ="BSD-generic32"
27
+ endif
28
+
29
+ ifeq ($(IOS_ARCH ) ,i386)
30
+ OPENSSL_CONFIG_VARS ="BSD-generic32"
31
+ endif
32
+
33
+
25
34
$(TARBALLS ) /openssl-$(OPENSSL_VERSION ) .tar.gz :
26
35
$(call download,$(OPENSSL_URL ) )
27
36
36
45
37
46
.openssl : openssl
38
47
cd $< && $(HOSTVARS ) ./Configure $(OPENSSL_CONFIG_VARS ) --prefix=$(PREFIX ) $(OPENSSL_COMPILER )
48
+ ifdef HAVE_IOS
49
+ # cd $< && perl -i -pe 's|static volatile sig_atomic_t intr_signal|static volatile int intr_signal|' crypto/ui/ui_openssl.c
50
+ cd $< && perl -i -pe "s|^CC= xcrun clang|CC= xcrun cc -arch ${IOS_ARCH} -miphoneos-version-min=6.0 |g" Makefile
51
+ cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= -isysroot ${IOS_SDK} |g" Makefile
52
+ endif
39
53
cd $< && $(MAKE) install
40
54
touch $@
You can’t perform that action at this time.
0 commit comments