-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
33 lines (22 loc) · 738 Bytes
/
makefile
File metadata and controls
33 lines (22 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Automatically set parallel jobs based on available CPU cores
MAKEFLAGS += -j$(shell nproc)
OUTPUT_DIR := dist
.DEFAULT_GOAL := build
ARCH_MAP_x86_64 := amd64
ARCH_MAP_arm64 := arm64
build: doot-linux-x86_64 doot-darwin-x86_64 doot-windows-x86_64.exe \
doot-linux-arm64 doot-darwin-arm64 doot-windows-arm64.exe
codegen: lib/common/cache/Colfer.go
test:
go test ./test -count=1
check:
staticcheck ./...
create-prerelease:
.github/create-prerelease.sh
doot-%: codegen
@GOOS=$(word 1,$(subst -, ,$*)) \
GOARCH=$(ARCH_MAP_$(word 2,$(subst -, ,$*))) \
go build -o $(OUTPUT_DIR)/doot-$*
lib/common/cache/Colfer.go: lib/common/cache/cache.colf
bin/colf -b lib/common Go lib/common/cache/cache.colf
.PHONY: build test