forked from Tai7sy/v2ray_mobile_lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (26 loc) · 918 Bytes
/
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
BUILD_DIR=build
IOS_ARTIFACT=$(BUILD_DIR)/libv2ray.framework
ANDROID_ARTIFACT=$(BUILD_DIR)/libv2ray.aar
LDFLAGS="-s -w"
IMPORT_PATH=github.com/Tai7sy/v2ray_mobile_lib
goDeps:
go get -d ./...
go get golang.org/x/mobile/cmd/gomobile
gomobile init
# go get -u github.com/golang/protobuf/protoc-gen-go
tun2socksBinaryDeps:
cd tun2socksBinarys; $(MAKE) binarys
init_env: clean goDeps tun2socksBinaryDeps
@echo DONE
install_android_sdk_ubuntu:
cd ~ ;curl -L https://raw.githubusercontent.com/Tai7sy/v2ray_mobile_lib/master/.scripts/ubuntu-cli-install-android-sdk.sh | sudo bash -
ls ~
ls ~/android-sdk-linux/
build_android:
mkdir -p $(BUILD_DIR)
gomobile bind -a -ldflags $(LDFLAGS) -tags android -target=android -o $(ANDROID_ARTIFACT) $(IMPORT_PATH)
build_ios:
mkdir -p $(BUILD_DIR)
gomobile bind -a -ldflags $(LDFLAGS) -tags ios -target=ios -o $(IOS_ARTIFACT) $(IMPORT_PATH)
clean:
rm -rf $(BUILD_DIR)