about summary refs log tree commit diff homepage
path: root/Makefile.common
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2015-04-25 20:15:13 +0100
committerDan Liew <daniel.liew@imperial.ac.uk>2015-04-25 20:25:07 +0100
commita32582b66fac29ad018a4f591ad91bcf1fd99ee0 (patch)
tree9b35e7bd3dee29734f029e68bf77ddeccedf42b2 /Makefile.common
parent91f389ab46fb29656600a11a373a54ddf896d821 (diff)
downloadklee-a32582b66fac29ad018a4f591ad91bcf1fd99ee0.tar.gz
Change install location of KLEE's bytecode runtime libraries
to ``${PREFIX}/lib/klee/runtime``.

This addresses issue #233
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.common b/Makefile.common
index 05a8e682..c56d1666 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -19,9 +19,15 @@ override ENABLE_PROFILING := $(RUNTIME_ENABLE_PROFILING)
 override ENABLE_COVERAGE := $(RUNTIME_ENABLE_COVERAGE)
 override DEBUG_SYMBOLS := $(RUNTIME_DEBUG_SYMBOLS)
 endif
+BYTECODE_DESTINATION:=$(DESTDIR)$(PROJ_libdir)/klee/runtime
 
 include $(PROJ_SRC_ROOT)/Makefile.rules
 
+# We have to build the bytecode install directory manually.
+# FIXME: Doing it this way is potentially racey!
+install::
+	mkdir -p $(BYTECODE_DESTINATION)
+
 # LLVMCC was added in 2.7.
 ifeq ($(LLVMCC),)
 LLVMCC := $(LLVMGCC)
@@ -47,7 +53,7 @@ KLEE_UCLIBC_BCA_NAME="klee-uclibc.bca"
 
 CXX.Flags += $(STP_CFLAGS)
 CXX.Flags += -DKLEE_DIR=\"$(PROJ_OBJ_ROOT)\" -DKLEE_INSTALL_BIN_DIR=\"$(PROJ_bindir)\"
-CXX.Flags += -DKLEE_INSTALL_LIB_DIR=\"$(PROJ_libdir)\"
+CXX.Flags += -DKLEE_INSTALL_LIB_DIR=\"$(BYTECODE_DESTINATION)\"
 
 ifeq ($(ENABLE_UCLIBC),1)
 	CXX.Flags += -DKLEE_UCLIBC_BCA_NAME=\"$(KLEE_UCLIBC_BCA_NAME)\"