Toolbox/Makefile

24 lines
544 B
Makefile

# Basic Go makefile
#CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-w -extldflags "-static"' -o Toolbox *.go
#GOCMD=GOOS=js GOARCH=wasm go
#GOCMD=go
GOCMD=CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
all: build wasm
build:
$(GOBUILD) -a -ldflags '-w -extldflags "-static"' -v -o Toolbox *.go
dbg-build:
$(GOBUILD) -v -gcflags=all="-N -l" -tags debug
test:
$(GOTEST) -v ./...
clean:
$(GOCLEAN)
wasm:
exec make -C ./goMetrix/app.wasm/ all &