-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile.gomobile
25 lines (20 loc) · 1002 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/rsa-mobile/bridge
GOMOBILE_BRIDGE_NAME?=RsaBridge
GOMOBILE_PACKAGE?=github.com/jerson/rsa-mobile/rsa
GOMOBILE_NAME?=Rsa
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)