about summary refs log tree commit diff homepage
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
parent91f389ab46fb29656600a11a373a54ddf896d821 (diff)
downloadklee-a32582b66fac29ad018a4f591ad91bcf1fd99ee0.tar.gz
Change install location of KLEE's bytecode runtime libraries
to ``${PREFIX}/lib/klee/runtime``.

This addresses issue #233
-rw-r--r--Makefile.common8
-rw-r--r--runtime/klee-uclibc/Makefile4
2 files changed, 9 insertions, 3 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)\"
diff --git a/runtime/klee-uclibc/Makefile b/runtime/klee-uclibc/Makefile
index e166cfbc..1b5ea682 100644
--- a/runtime/klee-uclibc/Makefile
+++ b/runtime/klee-uclibc/Makefile
@@ -47,8 +47,8 @@ uninstall:: remove_klee_uclibc
 
 copy_klee_uclibc:
 	@echo "Installing klee-uclibc archive"
-	$(Verb) $(CP) $(KLEE_UCLIBC_BCA) $(DESTDIR)$(PROJ_libdir)/$(KLEE_UCLIBC_BCA_NAME)
+	$(Verb) $(CP) $(KLEE_UCLIBC_BCA) $(BYTECODE_DESTINATION)/$(KLEE_UCLIBC_BCA_NAME)
 
 remove_klee_uclibc:
 	@echo "Removing klee-uclibc archive"
-	$(Verb) $(RM) $(DESTDIR)$(PROJ_libdir)/$(KLEE_UCLIBC_BCA_NAME)
+	$(Verb) $(RM) $(BYTECODE_DESTINATION)/$(KLEE_UCLIBC_BCA_NAME)