-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
38 lines (26 loc) · 819 Bytes
/
Makefile
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
34
35
36
37
38
GO_FILES=$(shell find . -name '*.go')
default: coredns
install: go.sum go.mod
go get
test: $(GO_FILES)
go test -test.v
linux/arm: $(GO_FILES)
mkdir -p linux/arm
GOOS=linux GOARCH=arm go build -o linux/arm/coredns ./example/main.go
linux/arm64: $(GO_FILES)
mkdir -p linux/arm64
GOOS=linux GOARCH=arm64 go build -o linux/arm64/coredns ./example/main.go
linux/amd64: $(GO_FILES)
mkdir -p linux/amd64
GOOS=linux GOARCH=amd64 go build -o linux/amd64/coredns ./example/main.go
linux/386: $(GO_FILES)
mkdir -p linux/386
GOOS=linux GOARCH=386 go build -o linux/386/coredns ./example/main.go
coredns: $(GO_FILES)
go build -o coredns ./example/main.go
run: coredns
cd example && ../coredns -conf ./Corefile
clean:
rm -rf coredns linux
dist: linux/arm linux/arm64 linux/amd64 linux/386
.PHONY: dist clean