From bf56aefdffec886996a6e9de34fedff9493dc9a8 Mon Sep 17 00:00:00 2001 From: NatureFreshMilk Date: Mon, 28 Jan 2019 09:43:58 +0100 Subject: [PATCH] working x86-64 and arm v7 --- server/Makefile | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/server/Makefile b/server/Makefile index b0429b7..0cb82cc 100644 --- a/server/Makefile +++ b/server/Makefile @@ -3,14 +3,6 @@ STATIC_VFS=vfs/static.go OUT_DIR=output ENV=GO111MODULE=on -XGO = sudo docker run -it --rm --entrypoint /bin/bash -v "$(shell pwd):/mnt/build" -XGO += -e "http_proxy=$(shell echo ${http_proxy})" -XGO += -e "https_proxy=$(shell echo ${https_proxy})" -XGO += karalabe/xgo-1.11.1 -c - -docker-build: $(STATIC_VFS) - $(XGO) "cd /mnt/build && make build" - all: build $(OUT_DIR): @@ -29,9 +21,6 @@ $(STATIC_VFS): build: $(STATIC_VFS) $(OUT_DIR) #CGO_ENABLED=1 GOOS=linux GOARCH=386 go build -o $(OUT_DIR)/mapserver-linux-x86 - #CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-linux-x86_64 - CC=arm-linux-gnueabi-gcc-5 CXX=arm-linux-gnueabi-g++-5 HOST=arm-linux-gnueabi PREFIX=/usr/arm-linux-gnueabi CFLAGS="-march=armv5" CXXFLAGS="-march=armv5" CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -o $(OUT_DIR)/mapserver-linux-arm - CGO_ENABLED=1 GOOS=darwin GOARCH=386 go build -o $(OUT_DIR)/mapserver-darwin-x86 - CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-darwin-x86_64 - CGO_ENABLED=1 GOOS=windows GOARCH=386 go build -o $(OUT_DIR)/mapserver-windows-x86.exe - CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-windows-x86_64.exe + CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-linux-x86_64 + # apt install gcc-5-arm-linux-gnueabihf, TODO: container + GOARCH=arm GOARM=7 CC=arm-linux-gnueabihf-gcc-5 CGO_ENABLED=1 go build -ldflags "-linkmode external -extldflags -static" -o $(OUT_DIR)/mapserver-linux-arm