forked from MTSR/mapserver
go modules
This commit is contained in:
parent
f62dcfd108
commit
18b33c7707
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
STATIC_VFS=vfs/static.go
|
STATIC_VFS=vfs/static.go
|
||||||
OUT_DIR=output
|
OUT_DIR=output
|
||||||
|
ENV=GO111MODULE=on
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
@ -8,25 +9,21 @@ $(OUT_DIR):
|
|||||||
mkdir $@
|
mkdir $@
|
||||||
|
|
||||||
test: $(STATIC_VFS) $(OUT_DIR)
|
test: $(STATIC_VFS) $(OUT_DIR)
|
||||||
go test ./...
|
$(ENV) go test ./...
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(STATIC_VFS)
|
rm -rf $(STATIC_VFS)
|
||||||
rm -rf $(OUT_DIR)
|
rm -rf $(OUT_DIR)
|
||||||
|
|
||||||
$(STATIC_VFS):
|
$(STATIC_VFS):
|
||||||
test -f ${HOME}/go/bin/esc || go get github.com/mjibson/esc
|
test -f ${HOME}/go/bin/esc || $(ENV) go get github.com/mjibson/esc
|
||||||
${HOME}/go/bin/esc -o $@ -prefix="static/" -pkg vfs static
|
${HOME}/go/bin/esc -o $@ -prefix="static/" -pkg vfs static
|
||||||
|
|
||||||
build: $(STATIC_VFS) $(OUT_DIR)
|
build: $(STATIC_VFS) $(OUT_DIR)
|
||||||
GOOS=linux GOARCH=386 go build -o $(OUT_DIR)/mapserver-linux-x86
|
$(ENV) GOOS=linux GOARCH=386 go build -o $(OUT_DIR)/mapserver-linux-x86
|
||||||
GOOS=linux GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-linux-x86_64
|
GOOS=linux GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-linux-x86_64
|
||||||
GOOS=linux GOARCH=arm go build -o $(OUT_DIR)/mapserver-linux-arm
|
GOOS=linux GOARCH=arm go build -o $(OUT_DIR)/mapserver-linux-arm
|
||||||
GOOS=darwin GOARCH=386 go build -o $(OUT_DIR)/mapserver-darwin-x86
|
GOOS=darwin GOARCH=386 go build -o $(OUT_DIR)/mapserver-darwin-x86
|
||||||
GOOS=darwin GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-darwin-x86_64
|
GOOS=darwin GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-darwin-x86_64
|
||||||
GOOS=windows GOARCH=386 go build -o $(OUT_DIR)/mapserver-windows-x86
|
GOOS=windows GOARCH=386 go build -o $(OUT_DIR)/mapserver-windows-x86
|
||||||
GOOS=windows GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-windows-x86_64
|
GOOS=windows GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-windows-x86_64
|
||||||
|
|
||||||
profile:
|
|
||||||
go test -cpuprofile=cprof ./tilerenderer
|
|
||||||
go tool pprof --text cprof
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user