-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile.gomobile
25 lines (20 loc) · 1022 Bytes
/
Makefile.gomobile
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
GOMOBILE_BRIDGE_PACKAGE?=github.com/jerson/openpgp-mobile/bridge
GOMOBILE_BRIDGE_NAME?=OpenPGPBridge
GOMOBILE_PACKAGE?=github.com/jerson/openpgp-mobile/openpgp
GOMOBILE_NAME?=Openpgp
gomobile:
go install golang.org/x/mobile/cmd/gomobile@latest
go get golang.org/x/mobile/cmd/gobind
gomobile init
gomobile_bridge_android:
mkdir -p output/android
gomobile bind -ldflags="-w -s" -target=android -o output/android/$(GOMOBILE_BRIDGE_NAME).aar $(GOMOBILE_BRIDGE_PACKAGE)
gomobile_bridge_ios:
mkdir -p output/ios
gomobile bind -ldflags="-w -s" -target=ios,iossimulator,macos,maccatalyst -iosversion=14 -o output/ios/$(GOMOBILE_BRIDGE_NAME).xcframework $(GOMOBILE_BRIDGE_PACKAGE)
gomobile_android:
mkdir -p output/android
gomobile bind -ldflags="-w -s" -target=android -o output/android/$(GOMOBILE_NAME).aar $(GOMOBILE_PACKAGE)
gomobile_ios:
mkdir -p output/ios
gomobile bind -ldflags="-w -s" -target=ios,iossimulator,macos,maccatalyst -iosversion=14 -o output/ios/$(GOMOBILE_NAME).xcframework $(GOMOBILE_PACKAGE)