~gsthnz/satellite

ref: 08c1a5a59b68a33880f45218cdfad85b6e1b7c65 satellite/Makefile -rw-r--r-- 1.2 KiB
08c1a5a5Paper Set minimum TLS version to TLS 1.2 1 year, 7 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.POSIX:
.SUFFIXES:
.SUFFIXES: .1 .5 .1.scd .5.scd

GO?=go

GOSRC!=find . -name '*.go'
GOSRC+=go.mod go.sum

PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
SHAREDIR?=$(PREFIX)/share/satellite
MANDIR?=$(PREFIX)/share/man

all: satellite satellite.toml doc

satellite: $(GOSRC)
	$(GO) build -o $@

satellite.toml: config/satellite.toml.in
	sed -e 's:@SHAREDIR@:$(SHAREDIR):g' > $@ < config/satellite.toml.in

DOCS := \
	doc/satellite.1 \
	doc/satellite.toml.5

.1.scd.1:
	scdoc < $< > $@

.5.scd.5:
	scdoc < $< > $@

doc: $(DOCS)

install: all
	mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 \
		$(DESTDIR)$(SHAREDIR)
	install -m755 satellite $(DESTDIR)$(BINDIR)/satellite
	install -m644 satellite.toml $(DESTDIR)$(SHAREDIR)/satellite.toml
	install -m644 doc/satellite.1 $(DESTDIR)$(MANDIR)/man1/satellite.1
	install -m644 doc/satellite.toml.5 $(DESTDIR)$(MANDIR)/man5/satellite.toml.5

uninstall: all
	rm -r $(DESTDIR)$(BINDIR)/satellite
	rm -fr $(DESTDIR)$(SHAREDIR)
	rm -fr $(DESTDIR)$(MANDIR)/man1/satellite.1
	rm -fr $(DESTDIR)$(MANDIR)/man5/satellite.5.toml

clean:
	rm -rf $(DOCS) satellite satellite.toml

.PHONY:
	all doc satellite satellite.toml clean