-
Notifications
You must be signed in to change notification settings - Fork 190
/
Makefile
66 lines (56 loc) · 2.72 KB
/
Makefile
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
all: lib/libGRMustache7-iOS.a lib/libGRMustache7-MacOS.a include/GRMustache.h Reference
lib/libGRMustache7-iOS.a: build/GRMustache7-iOS/Release-iphoneos/libGRMustache7-iOS.a build/GRMustache7-iphonesimulator/Release-iphonesimulator/libGRMustache7-iOS.a build/GRMustache7-iphonesimulator-x86_64/Release-iphonesimulator/libGRMustache7-iOS.a
mkdir -p lib
lipo -create \
"build/GRMustache7-iphonesimulator/Release-iphonesimulator/libGRMustache7-iOS.a" \
"build/GRMustache7-iphonesimulator-x86_64/Release-iphonesimulator/libGRMustache7-iOS.a" \
"build/GRMustache7-iOS/Release-iphoneos/libGRMustache7-iOS.a" \
-output "lib/libGRMustache7-iOS.a"
lib/libGRMustache7-MacOS.a: build/MacOS/Release/libGRMustache7-MacOS.a
mkdir -p lib
cp build/MacOS/Release/libGRMustache7-MacOS.a lib/libGRMustache7-MacOS.a
build/GRMustache7-iOS/Release-iphoneos/libGRMustache7-iOS.a:
xcodebuild -project src/GRMustache.xcodeproj \
-target GRMustache7-iOS \
-configuration Release \
build SYMROOT=../build/GRMustache7-iOS
build/GRMustache7-iphonesimulator/Release-iphonesimulator/libGRMustache7-iOS.a:
xcodebuild -project src/GRMustache.xcodeproj \
-target GRMustache7-iOS \
-configuration Release \
-sdk iphonesimulator \
-arch "i386" \
build SYMROOT=../build/GRMustache7-iphonesimulator
build/GRMustache7-iphonesimulator-x86_64/Release-iphonesimulator/libGRMustache7-iOS.a:
xcodebuild -project src/GRMustache.xcodeproj \
-target GRMustache7-iOS \
-configuration Release \
-sdk iphonesimulator \
-arch "x86_64" \
build SYMROOT=../build/GRMustache7-iphonesimulator-x86_64
build/MacOS/Release/libGRMustache7-MacOS.a:
xcodebuild -project src/GRMustache.xcodeproj \
-target GRMustache7-MacOS \
-configuration Release \
build SYMROOT=../build/MacOS
include/GRMustache.h: build/MacOS/Release/libGRMustache7-MacOS.a
cp -R build/MacOS/Release/include/GRMustache include
Reference: include/GRMustache.h
# Appledoc does not parse availability macros: create a temporary directory
# with "cleaned" GRMustache headers.
rm -Rf /tmp/GRMustache_include
cp -Rf include /tmp/GRMustache_include
for f in /tmp/GRMustache_include/*; do \
cat $${f} | sed "s/AVAILABLE_[A-Za-z0-9_]*//g" > $${f}.tmp; \
mv -f $${f}.tmp $${f}; \
done
# Generate documentation
mkdir Reference
appledoc --output Reference AppledocSettings.plist /tmp/GRMustache_include || true
# Cleanup
rm -Rf /tmp/GRMustache_include
clean:
rm -rf build
rm -rf include
rm -rf lib
rm -rf Reference