aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: e24cb3a38be2a56a909ae7af9a21e044421f0b8a (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
SOURCES=$(wildcard *.go) $(wildcard cmd/*.go)
NAME=wx
PREFIX?=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man

.PHONY: all
all: $(NAME) $(NAME).1

$(NAME).1: doc/$(NAME).1.scd
	scdoc < $< > $@

$(NAME): $(SOURCES)
	go build -o $(NAME) .

.PHONY: clean
clean:
	rm -f $(NAME)
	rm -f $(NAME).1

.PHONY: install
install: $(NAME) $(NAME).1
	install -m755 $(NAME) $(BINDIR)
	install -m644 $(NAME).1 $(MANDIR)/man1