aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2020-05-20 09:36:10 -0400
committerThanos Makatos <thanos.makatos@nutanix.com>2020-05-20 09:36:10 -0400
commit7cdf204ea20a73ae0faac064ba97ec87b1ce009d (patch)
tree4c723f0db3cab8bd8b276d666c41d5186f2608f6 /Makefile
parent189353c6499c1042549dc005a963113c9c24f2a1 (diff)
downloadlibvfio-user-7cdf204ea20a73ae0faac064ba97ec87b1ce009d.zip
libvfio-user-7cdf204ea20a73ae0faac064ba97ec87b1ce009d.tar.gz
libvfio-user-7cdf204ea20a73ae0faac064ba97ec87b1ce009d.tar.bz2
allow installation location to be overridden
This allows package systems to use /usr (instead of CMake's default /usr/local), which is the typical choice.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5a4482e..9d0676a 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,7 @@ BUILD_DIR_BASE = $(CURDIR)/build
BUILD_DIR = $(BUILD_DIR_BASE)/$(BUILD_TYPE)
KDIR ?= "/lib/modules/$(shell uname -r)/build"
+INSTALL_PREFIX ?= /usr/local
PHONY_TARGETS := all realclean buildclean force_cmake export install-export tags
@@ -68,6 +69,7 @@ $(BUILD_DIR)/Makefile:
-D "CMAKE_C_FLAGS:STRING=$(CFLAGS)" \
-D "CMAKE_BUILD_TYPE:STRING=$(CMAKE_BUILD_TYPE)" \
-D "KDIR=$(KDIR)" \
+ -D "CMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX)" \
$(CURDIR)
tags: