forked from MTSR/mapserver
cross targets
This commit is contained in:
parent
48e5db6873
commit
bb6953ba9c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
output
|
17
Makefile
Normal file
17
Makefile
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
OUT_DIR=output
|
||||
MOD_ZIP=$(OUT_DIR)/mapserver-mod.zip
|
||||
|
||||
all: $(OUT_DIR) $(MOD_ZIP)
|
||||
$(MAKE) -C server all
|
||||
cp server/output/* $(OUT_DIR)/
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir $@
|
||||
|
||||
$(MOD_ZIP): $(OUT_DIR)
|
||||
cd mod && zip -r ../$(OUT_DIR)/mapserver-mod.zip mapserver
|
||||
|
||||
clean:
|
||||
rm -rf $(OUT_DIR)
|
||||
$(MAKE) -C server clean
|
@ -1,19 +1,31 @@
|
||||
|
||||
STATIC_VFS=vfs/static.go
|
||||
OUT_DIR=output
|
||||
|
||||
test: $(STATIC_VFS)
|
||||
all: build
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir $@
|
||||
|
||||
test: $(STATIC_VFS) $(OUT_DIR)
|
||||
go test ./...
|
||||
|
||||
clean:
|
||||
rm -rf $(STATIC_VFS)
|
||||
rm -rf mapserver
|
||||
rm -rf $(OUT_DIR)
|
||||
|
||||
$(STATIC_VFS):
|
||||
go get github.com/mjibson/esc
|
||||
test -f ${HOME}/go/bin/esc || go get github.com/mjibson/esc
|
||||
${HOME}/go/bin/esc -o $@ -prefix="static/" -pkg vfs static
|
||||
|
||||
build: $(STATIC_VFS)
|
||||
go build
|
||||
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
|
||||
GOOS=darwin GOARCH=386 go build -o $(OUT_DIR)/mapserver-macos-x86
|
||||
GOOS=darwin GOARCH=amd64 go build -o $(OUT_DIR)/mapserver-macos-x86_64
|
||||
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
|
||||
|
||||
profile:
|
||||
go test -cpuprofile=cprof ./tilerenderer
|
||||
|
@ -8,6 +8,7 @@ github.com/google/pprof v0.0.0-20190109223431-e84dfd68c163 h1:beB+Da4k9B1zmgag78
|
||||
github.com/google/pprof v0.0.0-20190109223431-e84dfd68c163/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o=
|
||||
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"mapserver/params"
|
||||
"mapserver/tileupdate"
|
||||
"mapserver/web"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -28,7 +29,11 @@ func main() {
|
||||
|
||||
if p.Version {
|
||||
fmt.Print("Mapserver version: ")
|
||||
fmt.Println(app.Version)
|
||||
fmt.Print(app.Version)
|
||||
fmt.Print(" OS: ")
|
||||
fmt.Print(runtime.GOOS)
|
||||
fmt.Print(" Architecture: ")
|
||||
fmt.Println(runtime.GOARCH)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user