forked from alexlance/userd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (20 loc) · 704 Bytes
/
Makefile
File metadata and controls
28 lines (20 loc) · 704 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
NAME := userd
DEPS := go.mod go.sum main.go distro.go
build:
go build -o dist/$(NAME)
# I bet there's a better way to do this, but I don't want to spend brain cells on this right now
all: dist/$(NAME)-linux-amd64 dist/$(NAME)-linux-arm64 dist/$(NAME)-darwin-amd64 dist/$(NAME)-darwin-arm64
dist/$(NAME)-linux-amd64: $(DEPS)
GOOS=linux GOARCH=amd64 go build -o $@
dist/$(NAME)-linux-arm64: $(DEPS)
mkdir -p $(dir $@)
GOOS=linux GOARCH=arm64 go build -o $@
dist/$(NAME)-darwin-amd64: $(DEPS)
mkdir -p $(dir $@)
GOOS=darwin GOARCH=amd64 go build -o $@
dist/$(NAME)-darwin-arm64: $(DEPS)
mkdir -p $(dir $@)
GOOS=darwin GOARCH=arm64 go build -o $@
clean:
rm -rf dist
-o $(dir $@)PHONY: clean