-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
53 lines (36 loc) · 793 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
PROGNAME ?= philote
SOURCES = *.go
DEPS = $(firstword $(subst :, ,$(GOPATH)))/up-to-date
GPM ?= gpm
-include config.mk
all: $(PROGNAME)
$(PROGNAME): bin $(SOURCES) $(DEPS) | $(dir $(PROGNAME))
go build -o bin/$(PROGNAME)
server: $(PROGNAME)
./bin/$(PROGNAME)
test: $(PROGNAME) $(SOURCES)
LOGLEVEL=error go test
clean:
rm -rf pkg/
dependencies: $(DEPS)
cross-compile: clean
script/cross-compile
config.mk:
@./configure
install: philote
install -d $(prefix)/bin
install -m 0755 bin/philote /usr/local/bin
uninstall:
rm -f $(prefix)/bin/philote
$(DEPS): Godeps | $(dir $(DEPS))
$(GPM) get
touch $@
##
# Directories
##
$(dir $(PROGNAME)) $(dir $(DEPS)) bin:
mkdir -p $@
##
# You're a PHONY! Just a big, fat PHONY.
##
.PHONY: run test clean dependencies cross-compile