2019-01-05 19:21:24 +03:00
|
|
|
|
2019-01-11 12:49:19 +03:00
|
|
|
STATIC_VFS=vfs/static.go
|
2019-01-23 11:11:55 +03:00
|
|
|
OUT_DIR=output
|
2019-01-11 12:49:19 +03:00
|
|
|
|
2019-01-23 11:11:55 +03:00
|
|
|
all: build
|
|
|
|
|
|
|
|
$(OUT_DIR):
|
|
|
|
mkdir $@
|
|
|
|
|
|
|
|
test: $(STATIC_VFS) $(OUT_DIR)
|
2019-01-05 19:21:24 +03:00
|
|
|
go test ./...
|
|
|
|
|
2019-01-21 21:18:07 +03:00
|
|
|
clean:
|
2019-01-22 22:19:04 +03:00
|
|
|
rm -rf $(STATIC_VFS)
|
2019-01-23 11:11:55 +03:00
|
|
|
rm -rf $(OUT_DIR)
|
2019-01-21 21:18:07 +03:00
|
|
|
|
2019-01-11 12:49:19 +03:00
|
|
|
$(STATIC_VFS):
|
2019-01-23 11:11:55 +03:00
|
|
|
test -f ${HOME}/go/bin/esc || go get github.com/mjibson/esc
|
2019-01-11 12:49:19 +03:00
|
|
|
${HOME}/go/bin/esc -o $@ -prefix="static/" -pkg vfs static
|
|
|
|
|
2019-01-23 11:11:55 +03:00
|
|
|
build: $(STATIC_VFS) $(OUT_DIR)
|
|
|
|
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=arm go build -o $(OUT_DIR)/mapserver-linux-arm
|
2019-01-23 17:49:39 +03:00
|
|
|
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
|
2019-01-23 11:11:55 +03:00
|
|
|
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
|
2019-01-17 17:59:59 +03:00
|
|
|
|
|
|
|
profile:
|
|
|
|
go test -cpuprofile=cprof ./tilerenderer
|
|
|
|
go tool pprof --text cprof
|