about summary refs log tree commit diff
path: root/mk/lib.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/lib.mk')
-rw-r--r--mk/lib.mk24
1 files changed, 23 insertions, 1 deletions
diff --git a/mk/lib.mk b/mk/lib.mk
index f7c8c6b3aa84..4ad5c636c8d4 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -14,17 +14,40 @@ dist-files :=
 OS = $(shell uname -s)
 
 
+# Hack to define a literal space.
+space :=
+space +=
+
+
+# Hack to define a literal newline.
+define newline
+
+
+endef
+
+
 # Default installation paths.
 prefix ?= /usr/local
 libdir ?= $(prefix)/lib
 bindir ?= $(prefix)/bin
 libexecdir ?= $(prefix)/libexec
 datadir ?= $(prefix)/share
+jardir ?= $(datadir)/java
 localstatedir ?= $(prefix)/var
 sysconfdir ?= $(prefix)/etc
 mandir ?= $(prefix)/share/man
 
 
+# Initialise support for build directories.
+builddir ?=
+
+ifdef builddir
+  buildprefix = $(builddir)/
+else
+  buildprefix =
+endif
+
+
 # Pass -fPIC if we're building dynamic libraries.
 BUILD_SHARED_LIBS ?= 1
 
@@ -44,7 +67,6 @@ ifeq ($(BUILD_SHARED_LIBS), 1)
   SET_RPATH_TO_LIBS ?= 1
 endif
 
-
 # Pass -g if we want debug info.
 BUILD_DEBUG ?= 1