~gjabell/bmk

ref: ca2de32339c72c8139e5e7fb18d854e9a8b0172a bmk/Makefile -rw-r--r-- 560 bytes View raw
ca2de323Galen Abell Add tests for UTM and tag normalize 9 months ago
                                                                                
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
PREFIX?=/usr/local
_INSTDIR=$(DESTDIR)$(PREFIX)
BINDIR?=$(_INSTDIR)/bin
SHAREDIR?=$(_INSTDIR)/share/bmk
MANDIR?=$(_INSTDIR)/share/man

bmk:
	go build \
		-ldflags "-X main.Prefix=$(PREFIX)" \
		-ldflags "-X main.ShareDir=$(SHAREDIR)" \
		-o $@

doc: bmk
	./bmk doc -c config/config.toml

all: bmk doc

clean:
	$(RM) bmk doc/*.1

install: bmk
	mkdir -p $(BINDIR) $(MANDIR)/man1 $(SHAREDIR)
	install -m755 bmk $(BINDIR)/bmk
	install -m644 doc/*.1 $(MANDIR)/man1/
	install -m644 config/config.toml $(SHAREDIR)/config.toml

.DEFAULT_GOAL := all

.PHONY: all clean