-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_lib
executable file
·26 lines (19 loc) · 900 Bytes
/
build_lib
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
#!/bin/csh
set outdir = "libAdditions"
set outfile1 = libAdditions-iPad.a
set outfile2 = libAdditions-iPhone.a
set sdkver = "5.0"
set iphonesdk = iphoneos$sdkver
set simsdk = iphonesimulator$sdkver
if ( ! -e "$outdir" ) then
mkdir $outdir
endif
rm $outdir/*
xcodebuild -sdk $iphonesdk -project AdditionsLib.xcodeproj -target AdditionsLib-iPad
xcodebuild -sdk $simsdk -project AdditionsLib.xcodeproj -target AdditionsLib-iPad
xcodebuild -sdk $iphonesdk -project AdditionsLib.xcodeproj -target AdditionsLib-iPhone
xcodebuild -sdk $simsdk -project AdditionsLib.xcodeproj -target AdditionsLib-iPhone
lipo -create build/Release-iphoneos/$outfile1 build/Release-iphonesimulator/$outfile1 -output "$outdir/$outfile1"
lipo -create build/Release-iphoneos/$outfile2 build/Release-iphonesimulator/$outfile2 -output "$outdir/$outfile2"
find . -name "*.h" -exec cp {} "$outdir" \;
echo Library in $outdir