# Makefile BINARY=lib_news.so GO_VERSION=1.24 LOCAL_GOPATH := $(shell go env GOPATH) GO_BUILD=docker run --rm \ -v $(PWD):/app \ -v $(LOCAL_GOPATH):/go \ -w /app \ -e GOPROXY=https://goproxy.cn,direct \ golang:$(GO_VERSION) \ go build -o $(BINARY) -buildmode=c-shared all: clean build build: $(GO_BUILD) main.go clean: rm -f $(BINARY) $(BINARY:.so=.h)