-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
52 lines (35 loc) · 1.13 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
DROPBOX=~/Dropbox/Public/geodns/dnsmonitor
all: templates
test: templates
go test
dir: $(DROPBOX)
templates: static/js/templates.js static.go
static/js/templates.js: templates/client/*.html
hulk templates/client/*.html > static/js/templates.js
static.go: templates/* static/* templates/*/* static/*/*
go generate
$(DROPBOX):
mkdir -p $(DROPBOX)
sh: $(DROPBOX)/install.sh
setup: dir sh
linux: setup $(DROPBOX)/dnsmonitor-linux-x86_64 instructions
freebsd: setup $(DROPBOX)/dnsmonitor-freebsd-amd64 instructions
$(DROPBOX)/dnsmonitor-linux-x86_64:
GOOS=linux \
GOARCH=amd64 \
go build -o $(DROPBOX)/dnsmonitor-linux-x86_64
$(DROPBOX)/dnsmonitor-freebsd-amd64:
GOOS=freebsd \
GOARCH=amd64 \
go build -o $(DROPBOX)/dnsmonitor-freebsd-amd64
instructions:
@echo "curl -sk https://dl.dropboxusercontent.com/u/25895/geodns/dnsmonitor/install.sh | sh"
freebsd: setup
GOOS=linux \
GOARCH=amd64 \
go build -o $(DROPBOX)/dnsmonitor-linux-x86_64
@echo "curl -sk https://dl.dropboxusercontent.com/u/25895/geodns/dnsmonitor/install.sh | sh"
$(DROPBOX)/install.sh: install.sh
cp -p install.sh $(DROPBOX)/
push:
( cd $(DROPBOX); sh ../push )