tlstunnel/Makefile

36 lines
742 B
Makefile
Raw Permalink Normal View History

2020-09-09 13:13:57 +00:00
.POSIX:
.SUFFIXES:
GO = go
RM = rm
SCDOC = scdoc
GOFLAGS =
PREFIX = /usr/local
2020-09-10 21:17:52 +00:00
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
SYSCONFDIR = /etc
SHAREDSTATEDIR = /var/lib
goflags = $(GOFLAGS) \
-ldflags="-X 'main.configPath=$(SYSCONFDIR)/tlstunnel/config' \
-X 'main.certDataPath=$(SHAREDSTATEDIR)/tlstunnel'"
2020-09-09 13:13:57 +00:00
all: tlstunnel tlstunnel.1
tlstunnel:
$(GO) build $(goflags) ./cmd/tlstunnel
2020-09-09 13:13:57 +00:00
tlstunnel.1: tlstunnel.1.scd
$(SCDOC) <tlstunnel.1.scd >tlstunnel.1
clean:
$(RM) -rf tlstunnel tlstunnel.1
2021-07-24 15:03:02 +00:00
install:
2020-09-10 21:17:52 +00:00
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man1
mkdir -p $(DESTDIR)$(SYSCONFDIR)/tlstunnel
2020-09-10 21:17:52 +00:00
cp -f tlstunnel $(DESTDIR)$(BINDIR)
cp -f tlstunnel.1 $(DESTDIR)$(MANDIR)/man1
2021-02-19 13:56:00 +00:00
.PHONY: tlstunnel clean install