summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a740bd1..dad9c4a 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@
prefix = /usr/local
bindir = $(prefix)/bin
systemddir = $(prefix)/lib/systemd/system
+sysconfdir = $(prefix)/etc
+pkgconfdir = $(sysconfdir)/httpconnectd
DESTDIR =
Q = @
@@ -11,19 +13,20 @@ Q = @
MAKEFLAGS += -r
vars = $(patsubst .var.%,%,$(filter .var.%,$^))
-build_targets = httpconnectd httpconnectd@.service httpconnectd.socket
-install_targets = $(DESTDIR)$(bindir)/httpconnectd $(DESTDIR)$(systemddir)/httpconnectd@.service $(DESTDIR)$(systemddir)/httpconnectd.socket
+build_targets = httpconnectd httpconnectd@.service httpconnectd.socket basicauth.conf-sample
+install_targets = $(DESTDIR)$(bindir)/httpconnectd $(DESTDIR)$(systemddir)/httpconnectd@.service $(DESTDIR)$(systemddir)/httpconnectd.socket $(DESTDIR)$(pkgconfdir)/basicauth.conf-sample
all: $(build_targets)
install: $(install_targets)
clean:
- rm -f -- httpconnectd httpconnectd@.service
+ rm -f -- httpconnectd httpconnectd.sh httpconnectd@.service
uninstall:
rm -f -- $(install_targets)
rmdir -p -- $(dir $(install_targets))
.PHONY: all install clean uninstall
httpconnectd@.service: .var.bindir
+httpconnectd.sh: .var.pkgconfdir
########################################################################
@@ -37,6 +40,8 @@ $(DESTDIR)$(bindir)/%: %
install -Dm755 $< $@
$(DESTDIR)$(systemddir)/%: %
install -Dm644 $< $@
+$(DESTDIR)$(pkgconfdir)/%: %
+ install -Dm644 $< $@
.var.%: FORCE
$(Q)printf '%s' '$($*)' > .tmp$@ && { cmp -s .tmp$@ $@ && rm -f -- .tmp$@ || mv -Tf .tmp$@ $@; } || { rm -f -- .tmp$@; false; }