Skip to content

Commit bbdb2eb

Browse files
committed
Makefile: Added a simple build make target
1 parent d4c1b25 commit bbdb2eb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
qid.db
2+
/builds

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,14 @@ gen:
4646
test:
4747
@go test ./...
4848

49+
PLATFORMS := linux/amd64 windows/amd64 darwin/amd64
50+
51+
temp = $(subst /, ,$@)
52+
os = $(word 1, $(temp))
53+
arch = $(word 2, $(temp))
54+
55+
.PHONY: release $(PLATFORMS)
56+
release: $(PLATFORMS)
57+
58+
$(PLATFORMS):
59+
GOOS=$(os) GOARCH=$(arch) go build -o ./builds/'$(os)-$(arch)' .

0 commit comments

Comments
 (0)