[CRIU] [PATCH] make install: guess LIBDIR
Kir Kolyshkin
kir at openvz.org
Wed Feb 5 13:50:04 PST 2014
For x86_64, LIBDIR can be tricky to find out. Nevertheless, this
works for at least RedHat/CentOS/Fedora, SLES/openSUSE, Debian/Ubuntu
and Gentoo. So, while it can guess LIBDIR wrong, this is still
a good approximation for those installing criu from source.
Cc: Adrian Reber <adrian at lisas.de>
Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
Makefile.inc | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Makefile.inc b/Makefile.inc
index 032a99a..49cee8f 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -16,4 +16,14 @@ SBINDIR := $(PREFIX)/sbin
MANDIR := $(PREFIX)/share/man
SYSTEMDUNITDIR := $(PREFIX)/lib/systemd/system/
LIBDIR := $(PREFIX)/lib
+# For recent Debian/Ubuntu with multiarch support
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \
+ -qDEB_HOST_MULTIARCH 2>/dev/null)
+ifneq "$(DEB_HOST_MULTIARCH)" ""
+LIBDIR := $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
+# For most other systems
+else ifeq "$(shell uname -m)" "x86_64"
+LIBDIR := $(PREFIX)/lib64
+endif
+
INCLUDEDIR := $(PREFIX)/include/criu
--
1.8.1.4
More information about the CRIU
mailing list