forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbind-ios-standalone.sh
More file actions
executable file
·55 lines (49 loc) · 1.18 KB
/
bind-ios-standalone.sh
File metadata and controls
executable file
·55 lines (49 loc) · 1.18 KB
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
#!/bin/bash
set -e
case "$1" in
*-community.lcext)
DEPS_FILE="${SRCROOT}/standalone.ios"
;;
*-commercial.lcext)
DEPS_FILE="${SRCROOT}/../livecode/engine/standalone.ios"
;;
esac
case "${SDKROOT}" in
*iPhoneOS*)
case "$1" in
*-community.lcext)
ln -sf standalone-mobile-lib-community.lcext "$BUILT_PRODUCTS_DIR/standalone-mobile-community.ios-engine"
;;
*-commercial.lcext)
ln -sf standalone-mobile-lib-commercial.lcext "$BUILT_PRODUCTS_DIR/standalone-mobile-commercial.ios-engine"
;;
*)
echo "Unexpected filename $1" >&2
exit 1
;;
esac
exit
;;
esac
if [ -e "${PLATFORM_DEVELOPER_BIN_DIR}/g++" ] ; then
BIN_DIR="${PLATFORM_DEVELOPER_BIN_DIR}"
else
BIN_DIR="${DEVELOPER_BIN_DIR}"
fi
# Process the list of imports into a linker command line
while read dep; do
read type name <<< "${dep}"
case "${type}" in
library)
libs+=\ -l"${name}"
;;
framework)
libs+=\ -framework\ "${name}"
;;
*)
echo "Unknown dependency type ${type}" >&2
exit 1
;;
esac
done <"${DEPS_FILE}"
"${BIN_DIR}/g++" -rdynamic -ObjC ${libs} -arch ${ARCHS//\ /\ -arch\ } --sysroot "${SDKROOT}" -o $2 $1 -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET}