about summary refs log tree commit diff homepage
path: root/runtime/Runtest/Makefile
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@users.noreply.github.com>2017-01-16 16:36:42 +0000
committerGitHub <noreply@github.com>2017-01-16 16:36:42 +0000
commitaedbca881945da47005835a405188041b40ae7cc (patch)
tree84c553f78bc9e8bdcdd5b7aa2e2c9c78d84494dc /runtime/Runtest/Makefile
parent23e656156e4790a06a295d48932db53f2a582227 (diff)
parentdcc709dd23fc8a50d5dc087d4d5961dea041bf01 (diff)
downloadklee-aedbca881945da47005835a405188041b40ae7cc.tar.gz
Merge pull request #566 from delcypher/fix_libkleeruntest
Fixes and testing for libkleeRuntest
Diffstat (limited to 'runtime/Runtest/Makefile')
-rw-r--r--runtime/Runtest/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/Runtest/Makefile b/runtime/Runtest/Makefile
index 666fe06d..82e21345 100644
--- a/runtime/Runtest/Makefile
+++ b/runtime/Runtest/Makefile
@@ -59,3 +59,14 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD))
     # Don't allow unresolved symbols.
     LLVMLibsOptions += -Wl,--no-undefined
 endif
+
+ifeq ($(HOST_OS), Linux)
+	# HACK: Setup symlinks that `ldconfig` would set up
+	# so that libkleeRuntest can be used from the build directory.
+	# This is needed to run tests.
+	sym_link_name := $(SharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT).$(SHARED_VERSION)
+
+all:: $(LibName.SO)
+	$(Verb) [ ! -e "$(sym_link_name)" ] && ln -s $(LibName.SO) "$(sym_link_name)" || echo ""
+
+endif