remote-i3wm-go/Makefile

23 lines
598 B
Makefile

CGO_ENABLED = 0
CC = go build
CFLAGS = -trimpath
LDFLAGS = all=-w -s
GCFLAGS = all=
ASMFLAGS = all=
BUILD_DIR = build
LINUX_BIN = app-linux-amd64
all: build
deps:
go install github.com/GeertJohan/go.rice/rice@latest
cd cmd && rice embed-go
.PHONY:
build: deps
CGO_ENABLED=$(CGO_ENABLED) GOARCH=amd64 GOOS=linux $(CC) $(CFLAGS) -o $(BUILD_DIR)/$(LINUX_BIN) -ldflags="$(LDFLAGS)" -gcflags="$(GCFLAGS)" -asmflags="$(ASMFLAGS)" -tags=static_build ./cmd/
watch:
test -f cmd/rice-box.go && rm cmd/rice-box.go || true
gowatch -o build/app-live-linux-amd64 -args='./config.yaml' -p ./cmd/main.go