This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
67 lines (62 loc) · 1.82 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
66
67
help:
@echo "Usage: make <target> [lcp=<url>]\n\n\
Choose one of the following targets to generate:\n\
spm\t\t(recommended) Integration with Swift Package Manager\n\
carthage\tIntegration with Carthage\n\
cocoapods\tIntegration with CocoaPods\n\
dev\t\tIntegration with Git submodules and SPM, for contributors\n\n\
To enable Readium LCP, provide the liblcp URL EDRLab gave you, e.g.\n\
$$ make spm lcp=https://...\n\
"
clean:
@rm -f project.yml
@rm -f Podfile*
@rm -f Cartfile*
@rm -rf Carthage
@rm -rf Pods
@rm -rf R2TestApp.xcodeproj
@rm -rf R2TestApp.xcworkspace
spm: clean
ifdef lcp
@echo "binary \"$(lcp)\"" > Cartfile
carthage update --platform ios --cache-builds
@cp Integrations/SPM/project+lcp.yml project.yml
else
@cp Integrations/SPM/project.yml .
endif
xcodegen generate
@echo "\nopen R2TestApp.xcodeproj"
carthage: clean
ifdef lcp
@cp Integrations/Carthage/project+lcp.yml project.yml
@cp Integrations/Carthage/Cartfile+lcp Cartfile
@echo "binary \"$(lcp)\"" >> Cartfile
else
@cp Integrations/Carthage/project.yml .
@cp Integrations/Carthage/Cartfile .
endif
carthage update --platform ios --use-xcframeworks --cache-builds
xcodegen generate
@echo "\nopen R2TestApp.xcodeproj"
cocoapods: clean
ifdef lcp
@sed -e "s>LCP_URL>$(lcp)>g" Integrations/CocoaPods/Podfile+lcp > Podfile
@cp Integrations/CocoaPods/project+lcp.yml project.yml
else
@cp Integrations/CocoaPods/project.yml .
@cp Integrations/CocoaPods/Podfile .
endif
xcodegen generate
pod install
@echo "\nopen R2TestApp.xcworkspace"
dev: clean
ifdef lcp
@cp Integrations/Submodules/project+lcp.yml project.yml
@echo "binary \"$(lcp)\"" > Cartfile
carthage update --platform ios --cache-builds
else
@cp Integrations/Submodules/project.yml .
endif
git submodule update --init --recursive
xcodegen generate
@echo "\nopen R2TestApp.xcodeproj"