9 dev
=/Developer
/Platforms
/${plt}.platform
/Developer
10 sdk
=${dev}/SDKs
/${plt}5.0.sdk
12 mkdir -p sysroot.sim
/usr
/include
13 cp -a /usr
/include
/ffi sysroot.sim
/usr
/include
15 mkdir -p sysroot.sim
/usr
/lib
16 cp -a /usr
/lib
/libffi.dylib sysroot.sim
/usr
/lib
17 cp -a /usr
/lib
/libapr
-1.
* sysroot.sim
/usr
/lib
19 ln -s /System
/Library
/Frameworks
/WebKit.framework
/Versions
/A
/Headers sysroot.sim
/usr
/include
/WebKit
21 mkdir -p sysroot.sim
/Library
/Frameworks
/JavaScriptCore.framework
22 ln -s "${sdk}"/System
/Library
/PrivateFrameworks
/JavaScriptCore.framework
/JavaScriptCore sysroot.sim
/Library
/Frameworks
/JavaScriptCore.framework
23 ln -s /System
/Library
/Frameworks
/JavaScriptCore.framework
/Headers sysroot.sim
/Library
/Frameworks
/JavaScriptCore.framework
25 export CC
=${dev}/usr
/bin
/gcc
26 export CXX
=${dev}/usr
/bin
/g
++
27 export OBJCXX
=${dev}/usr
/bin
/g
++
30 flags_i386
+=(-isysroot "${sdk}")
32 flags_i386
+=(-Fsysroot.sim
/Library
/Frameworks
)
33 flags_i386
+=(-Isysroot.sim
/usr
/include
)
34 flags_i386
+=(-Lsysroot.sim
/usr
/lib
)
36 flags_i386
+=(-F"${sdk}"/System
/Library
/PrivateFrameworks
)
37 flags_i386
+=(-framework WebCore
)
40 for flag
in "${flags_i386[@]}"; do
41 flags
+=(-Xarch_i386 "${flag}")
44 flags
+=(-fobjc-abi-version=2)
47 export CFLAGS
=${cflags}
48 export CXXFLAGS
=${cflags}
49 export OBJCXXFLAGS
=${cflags}
51 export OBJCXXFLAGS
="${OBJCXXFLAGS} -Xarch_i386 -fobjc-legacy-dispatch"
54 for flag
in "${flags[@]}"; do
55 lflags
+=("-Xcompiler ${flag}")
59 export LTFLAGS
=${lflags}