-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (21 loc) · 725 Bytes
/
Makefile
File metadata and controls
36 lines (21 loc) · 725 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
GO?=$(shell which go)
OS:=$(shell lsb_release -si)
ARCH:=$(shell uname -m | sed 's/x86_//;s/i[3-6]86/32/')
VER:=$(shell lsb_release -sr)
GOSRC:=$(shell find ./cmd ./pkg -type f -print)
.DEFAULT_GOAL: all
all: clean build package
build: bin/docker-dns
package:
clean:
go clean -r .
run:
$(GO) run cmd/docker-dns/docker-dns.go -loglevel=debug -config=configs/docker-dns.json
install: bin/docker-dns
cp init/docker-dns.service /etc/systemd/system/docker-dns.service
cp configs/docker-dns /etc/NetworkManager/dnsmasq.d/docker-dns
cp configs/docker-dns.json /etc/docker-dns.json
cp bin/docker-dns /usr/local/bin/docker-dns
bin/docker-dns: $(GOSRC)
$(GO) build -o $@ cmd/docker-dns/docker-dns.go
chmod +x $@