>From 89ca0b6a2c278435d16e1f23ac7cd355553515f9 Mon Sep 17 00:00:00 2001 From: Jon Stanley <jonstan...@gmail.com> Date: Fri, 13 Nov 2015 15:22:58 +0100 Subject: [PATCH] trace-cmd: Makefile: Determine whether to install to lib or lib64
Determine whether an arch is 64 or 32 bit in order to determine whether to install to lib or lib64 Original patch from Jon Stanley found in Fedora git repo, modified to omit extraneous parts and simplifiy it a bit. Signed-off-by: John Kacur <jka...@redhat.com> --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 507af59bef69..8459204346fa 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,12 @@ $(call allow-override,AR,$(CROSS_COMPILE)ar) EXT = -std=gnu99 INSTALL = install +# figure out what arch we are on and install to right place +ARCH = $(shell getconf LONG_BIT) +LIBDIR_32 = lib +LIBDIR_64 = lib64 +LIBDIR=$(LIBDIR_$(ARCH)) + # Use DESTDIR for installing into a different root directory. # This is useful for building a package. The program will be # installed in this directory as if it was the root directory. @@ -47,7 +53,7 @@ html_install = $(prefix)/share/kernelshark/html html_install_SQ = '$(subst ','\'',$(html_install))' img_install = $(prefix)/share/kernelshark/html/images img_install_SQ = '$(subst ','\'',$(img_install))' -libdir ?= lib +libdir ?= $(LIBDIR) export man_dir man_dir_SQ html_install html_install_SQ INSTALL export img_install img_install_SQ -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/