Commit 712d5395 authored by Ondřej Surý's avatar Ondřej Surý

Daemons should be in sbin, make destination variables overridable

parent 1070c49a
......@@ -77,6 +77,7 @@ info:
$(info PREFIX: $(PREFIX))
$(info DESTDIR: $(DESTDIR))
$(info BINDIR: $(BINDIR))
$(info SBINDIR: $(SBINDIR))
$(info LIBDIR: $(LIBDIR))
$(info ETCDIR: $(ETCDIR))
$(info INCLUDEDIR: $(INCLUDEDIR))
......
......@@ -7,12 +7,13 @@ BUILDMODE := dynamic
HARDENING := yes
# Paths
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
INCLUDEDIR := $(PREFIX)/include
MODULEDIR := $(LIBDIR)/kdns_modules
ETCDIR := $(PREFIX)/etc/kresd
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SBINDIR ?= $(PREFIX)/sbin
LIBDIR ?= $(PREFIX)/lib
INCLUDEDIR ?= $(PREFIX)/include
MODULEDIR ?= $(LIBDIR)/kdns_modules
ETCDIR ?= $(PREFIX)/etc/kresd
# Tools
CC ?= cc
......
......@@ -35,7 +35,7 @@ endif
# Make binary
ifeq ($(HAS_lua)|$(HAS_libuv), yes|yes)
$(eval $(call make_bin,kresd,daemon,yes))
$(eval $(call make_sbin,kresd,daemon,yes))
endif
# Targets
......
......@@ -152,7 +152,7 @@ All paths are prefixed with ``PREFIX`` variable by default if not specified othe
:header: "Component", "Variable", "Default", "Notes"
"library", "``LIBDIR``", "``$(PREFIX)/lib``", "pkg-config is auto-generated [#]_"
"daemon", "``BINDIR``", "``$(PREFIX)/bin``", ""
"daemon", "``SBINDIR``", "``$(PREFIX)/sbin``", ""
"configuration", "``ETCDIR``", "``$(PREFIX)/etc/kresd``", "Configuration file, templates."
"modules", "``MODULEDIR``", "``$(LIBDIR)/kdns_modules``", "[#]_"
"work directory", "", "``$(PREFIX)/var/run/kresd``", "Run directory for daemon."
......
......@@ -120,6 +120,7 @@ endef
# Make targets (name,path,amalgable yes|no,abiver)
make_bin = $(call make_target,$(1),$(2),$(BINEXT),$(BINFLAGS),$(BINDIR),$(3))
make_sbin = $(call make_target,$(1),$(2),$(BINEXT),$(BINFLAGS),$(SBINDIR),$(3))
make_lib = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(LIBDIR),$(3),$(4))
make_module = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(MODULEDIR),$(3))
make_shared = $(call make_target,$(1),$(2),$(MODEXT),-$(MODTYPE),$(LIBDIR),$(3))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment