Makefile 575 Bytes
Newer Older
Lei Li's avatar
Lei Li committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.pre-build:
	mkdir -p lib/
SRC=./*.go
DST=lib/libagent.so

x86:
	export GOARCH=amd64 GOOS=linux GO111MODULE=on CGO_ENABLED=1 && go build -buildmode=c-shared -o $(DST) $(SRC)

arm:
	export GOARCH=arm GOOS=linux GO111MODULE=on CGO_ENABLED=1 CC=arm-linux-gnueabi-gcc  && go build -buildmode=c-shared -o $(DST) $(SRC)

android:
	export GOARCH=arm GOOS=android GO111MODULE=on CGO_ENABLED=1 CC=/usr/local/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang && go build -buildmode=c-shared -o $(DST) $(SRC)

.PHONY: clean
clean:
	rm -f lib/*