forked from MTSR/mapserver
build-all / build
This commit is contained in:
parent
3cfaf9c059
commit
f65dde7713
2
Makefile
2
Makefile
@ -3,7 +3,7 @@ OUT_DIR=output
|
||||
MOD_ZIP=$(OUT_DIR)/mapserver-mod.zip
|
||||
|
||||
all: $(OUT_DIR) $(MOD_ZIP)
|
||||
$(MAKE) -C server build-docker
|
||||
$(MAKE) -C server build-all-docker
|
||||
cp server/output/* $(OUT_DIR)/
|
||||
|
||||
$(OUT_DIR):
|
||||
|
@ -5,7 +5,7 @@ ENV=GO111MODULE=on
|
||||
|
||||
GO_LDFLAGS=-ldflags "-linkmode external -extldflags -static"
|
||||
|
||||
all: build
|
||||
all: build-all
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir $@
|
||||
@ -28,12 +28,20 @@ clean-all: clean
|
||||
rm -rf mapserver.json
|
||||
|
||||
build-docker:
|
||||
sudo docker run --rm -it -v $(shell pwd)/:/app -v mapserver-volume:/root/go -w /app mapserver-builder make
|
||||
sudo docker run --rm -it -v $(shell pwd)/:/app -v mapserver-volume:/root/go -w /app mapserver-builder make build
|
||||
|
||||
build-all-docker:
|
||||
sudo docker run --rm -it -v $(shell pwd)/:/app -v mapserver-volume:/root/go -w /app mapserver-builder make build-all
|
||||
|
||||
build: $(OUT_DIR)
|
||||
go generate
|
||||
# native
|
||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc go build $(GO_LDFLAGS) -o $(OUT_DIR)/mapserver-linux-x86_64
|
||||
|
||||
build-all: $(OUT_DIR)
|
||||
go generate
|
||||
# native
|
||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc go build $(GO_LDFLAGS) -o $(OUT_DIR)/mapserver-linux-x86_64
|
||||
# apt install gcc-8-i686-linux-gnu
|
||||
CGO_ENABLED=1 GOOS=linux GOARCH=386 CC=i686-linux-gnu-gcc-7 go build $(GO_LDFLAGS) -o $(OUT_DIR)/mapserver-linux-x86
|
||||
# apt install gcc-mingw-w64
|
||||
|
Loading…
Reference in New Issue
Block a user