summaryrefslogtreecommitdiff
path: root/Makefile
blob: dd6031f4c455356447c138f2191623f0b533cf58 (plain)
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
ifeq ($(PREFIX),)
	PREFIX := /usr/local
endif

ifeq ($(BINDIR),)
	BINDIR := /bin
endif

CMD := planr

ifdef DEBUG
	FLAGS=-ldflags=-w 
endif

MAIN_PKG := ./cmd/planr/main.go

$(CMD):
	go build $(FLAGS) -o $(CMD) $(MAIN_PKG)

install:
	mkdir -p $(DESTDIR)$(PREFIX)$(BINDIR)/
	install -D -m 755 $(CMD) $(DESTDIR)$(PREFIX)$(BINDIR)/

uninstall:
	rm -rf $(DESTDIR)$(PREFIX)$(BINDIR)/$(CMD)

clean:
	rm -rf $(CMD)

.PHONY: clean install uninstall $(CMD)