-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
97 lines (77 loc) · 2.67 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.PHONY: build
.DEFAULT_GOAL := help
ROOT_DIR=${PWD}
PROJ=axmol-extensions
GITHUB_REPO=paulocoutinhox/axmol-extensions
help:
@echo "Type: make [rule]. Available options are:"
@echo ""
@echo "- help"
@echo "- format"
@echo "- clean"
@echo ""
@echo "- build-ios"
@echo "- build-tvos"
@echo "- build-macos"
@echo "- build-wasm"
@echo ""
@echo "- deploy-ios"
@echo "- deploy-tvos"
@echo "- deploy-android"
@echo "- deploy-wasm"
@echo ""
format:
find -E Source/ -regex '.*\.(cpp|hpp|cc|cxx|c|h)' -exec clang-format -style=file -i {} \;
clean:
rm -rf build_*
rm -rf proj.android/app/build
find . -name ".DS_Store" -delete
build-ios:
rm -rf build_ios_arm64/
axmol build -p ios -a arm64 -c
build-tvos:
rm -rf build_tvos_arm64/
axmol build -p tvos -a arm64 -c
build-macos:
rm -rf build_arm64/
axmol build -c
build-wasm:
rm -rf build_wasm/
axmol build -p wasm
cd build_wasm && make
cp build_wasm/bin/axmol-extensions/axmol-extensions.html build_wasm/bin/axmol-extensions/index.html
deploy-ios:
rm -rf build_ios_arm64/
axmol build -p ios -a arm64 -c
cd build_ios_arm64 && \
xcodebuild -project ${PROJ}.xcodeproj -scheme ${PROJ} -sdk iphoneos
cd build_ios_arm64 && \
xcodebuild archive -project ${PROJ}.xcodeproj -scheme ${PROJ} -archivePath ${PROJ}.xcarchive
cd build_ios_arm64 && \
xcodebuild -exportArchive -archivePath ${PROJ}.xcarchive -exportOptionsPlist ../proj.ios_mac/ios/exportoptions-prod.plist -exportPath .
cd build_ios_arm64 && \
xcrun altool --upload-app -f ${PROJ}.ipa -t ios -u [email protected] -p ${APPLE_SPECIFIC_PASSWORD}
deploy-tvos:
rm -rf build_tvos_arm64/
axmol build -p tvos -a arm64 -c
cd build_tvos_arm64 && \
xcodebuild -project ${PROJ}.xcodeproj -scheme ${PROJ} -sdk appletvos
cd build_tvos_arm64 && \
xcodebuild archive -project ${PROJ}.xcodeproj -scheme ${PROJ} -archivePath ${PROJ}.xcarchive
cd build_tvos_arm64 && \
xcodebuild -exportArchive -archivePath ${PROJ}.xcarchive -exportOptionsPlist ../proj.ios_mac/ios/exportoptions-prod.plist -exportPath .
cd build_tvos_arm64 && \
xcrun altool --upload-app -f ${PROJ}.ipa -t tvos -u [email protected] -p ${APPLE_SPECIFIC_PASSWORD}
deploy-android:
cd proj.android && ./gradlew clean bundleRelease
echo "The bundle is here: proj.android/app/build/outputs/bundle/release/${PROJ}-release.aab"
deploy-wasm:
cd build_wasm/bin/axmol-extensions && \
echo "/*\n Cross-Origin-Embedder-Policy: require-corp\n Cross-Origin-Opener-Policy: same-origin" > _headers && \
rm -rf .git && \
git init . && \
git branch -M gh-pages && \
git add --all && \
git commit -am "published new version" && \
git push "[email protected]:$(GITHUB_REPO).git" gh-pages --force && \
rm -rf .git