Skip to content

Commit

Permalink
Update Makefile (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
cubxxw authored Aug 18, 2023
1 parent b2694ec commit 5f0cfe0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,18 @@ reset_remote_branch:
git pull $(remote_branch)

## ios: Build the iOS framework
.PHONY: ios tools.verify.gomobile
.PHONY: ios
ios:
go get golang.org/x/mobile
rm -rf build/ open_im_sdk/t_friend_sdk.go open_im_sdk/t_group_sdk.go open_im_sdk/ws_wrapper/
go mod download golang.org/x/exp
GOARCH=arm64 ./_output/tools/gomobile bind -v -trimpath -ldflags "-s -w" -o build/OpenIMCore.xcframework -target=ios ./open_im_sdk/ ./open_im_sdk_callback/
GOARCH=arm64 gomobile bind -v -trimpath -ldflags "-s -w" -o build/OpenIMCore.xcframework -target=ios ./open_im_sdk/ ./open_im_sdk_callback/

## android: Build the Android library
# Note: to build an AAR on Windows, gomobile, Android Studio, and the NDK must be installed.
# The NDK version tested by the OpenIM team was r20b.
# To build an AAR on Mac, gomobile, Android Studio, and the NDK version 20.0.5594570 must be installed.
.PHONY: android ios tools.verify.gomobile
.PHONY: android
android:
go get golang.org/x/mobile/bind
GOARCH=amd64 gomobile bind -v -trimpath -ldflags="-s -w" -o ./open_im_sdk.aar -target=android ./open_im_sdk/ ./open_im_sdk_callback/
Expand Down Expand Up @@ -513,4 +513,4 @@ install.gomobile:
## install.gobind: Install gobind
.PHONY: install.gobind
install.gobind:
@$(GO) install golang.org/x/mobile/cmd/gobind@latest
@$(GO) install golang.org/x/mobile/cmd/gobind@latest

0 comments on commit 5f0cfe0

Please sign in to comment.