aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-12-17 12:13:48 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-12-17 12:13:48 +0100
commit088552b319d8f5896e6cfd6a8e449b4239696ea2 (patch)
tree7e4f99a335d8df2ec97d53266e0831266492f589
parente81b82a2cf0c7e460d02c554c597a6cf9a144e8e (diff)
Set default installation paths
-rw-r--r--mk/lib.mk19
1 files changed, 12 insertions, 7 deletions
diff --git a/mk/lib.mk b/mk/lib.mk
index 0b469a13a..cec4eee1f 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -1,11 +1,6 @@
default: all
-# Include Autoconf variables.
-template_files += Makefile.config
-include Makefile.config
-
-
# Get rid of default suffixes. FIXME: is this a good idea?
.SUFFIXES:
@@ -16,8 +11,18 @@ bin_SCRIPTS :=
noinst_SCRIPTS :=
+# Default installation paths.
+prefix ?= /usr/local
+libdir ?= $(prefix)/lib
+bindir ?= $(prefix)/bin
+libexecdir ?= $(prefix)/libexec
+datadir ?= $(prefix)/share
+localstatedir ?= $(prefix)/var
+sysconfdir ?= $(prefix)/etc
+
+
# Pass -fPIC if we're building dynamic libraries.
-BUILD_SHARED_LIBS = 1
+BUILD_SHARED_LIBS ?= 1
ifeq ($(BUILD_SHARED_LIBS), 1)
GLOBAL_CFLAGS += -fPIC
@@ -27,7 +32,7 @@ endif
# Pass -g if we want debug info.
-BUILD_DEBUG = 1
+BUILD_DEBUG ?= 1
ifeq ($(BUILD_DEBUG), 1)
GLOBAL_CFLAGS += -g