Files
quake-kube/Makefile
Chris Marshall 2a599bcff5 Build standalone ioq3ded, fix asset timeout (#16)
When specifying `BUILD_STANDALONE=1` for ioq3ded, the default `com_homepath`, `com_basegame`, and `com_gamename` change to foo/foobar, so this sets those explicitly to their previously default values. This can be exposed via option later to allow for custom games. This also fixes the short read timeout used by CopyAssets.
2020-09-16 17:53:51 -04:00

22 lines
628 B
Makefile

BIN_DIR ?= bin
LDFLAGS := -s -w
GOFLAGS = -gcflags "all=-trimpath=$(PWD)" -asmflags "all=-trimpath=$(PWD)"
GO_BUILD_ENV_VARS := GO111MODULE=on CGO_ENABLED=0
q3: gen
@$(GO_BUILD_ENV_VARS) go build -o $(BIN_DIR)/q3 $(GOFLAGS) -ldflags '$(LDFLAGS)' ./cmd/q3
gen: ## Generate and embed templates
@go run tools/genstatic.go public public
VERSION ?= v1.0.5
IMAGE ?= docker.io/criticalstack/quake:$(VERSION)
.PHONY: build
build:
@docker build . --force-rm --build-arg GOPROXY --build-arg GOSUMDB -t $(IMAGE)
.PHONY: buildx
buildx:
@docker buildx build . --platform=linux/amd64,linux/arm64 --progress=auto -t $(IMAGE) --push