about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/kleaver/Makefile13
-rw-r--r--tools/klee/Makefile13
2 files changed, 22 insertions, 4 deletions
diff --git a/tools/kleaver/Makefile b/tools/kleaver/Makefile
index d9c417c1..21d84cbe 100644
--- a/tools/kleaver/Makefile
+++ b/tools/kleaver/Makefile
@@ -9,12 +9,21 @@
 
 LEVEL=../..
 TOOLNAME = kleaver
+
+include $(LEVEL)/Makefile.config
+
 STP_LIBS := stp_c_interface.a stp_AST.a stp_bitvec.a stp_constantbv.a stp_sat.a \
 	stp_simplifier.a
 # FIXME: Ideally we wouldn't have any LLVM dependencies here, which
 # means kicking out klee's Support.
-USEDLIBS = kleaverSolver.a kleaverExpr.a kleeSupport.a kleeBasic.a \
-	$(STP_LIBS)
+USEDLIBS = kleaverSolver.a kleaverExpr.a kleeSupport.a kleeBasic.a
+ifeq ($(ENABLE_EXT_STP),0)
+  USEDLIBS += $(STP_LIBS)
+endif
 LINK_COMPONENTS = support
 
 include $(LEVEL)/Makefile.common
+
+ifeq ($(ENABLE_EXT_STP),1)
+  LIBS += -lstp
+endif
diff --git a/tools/klee/Makefile b/tools/klee/Makefile
index 72188b79..23c8f1d9 100644
--- a/tools/klee/Makefile
+++ b/tools/klee/Makefile
@@ -9,10 +9,19 @@
 
 LEVEL=../..
 TOOLNAME = klee
+
+include $(LEVEL)/Makefile.config
+
 STP_LIBS := stp_c_interface.a stp_AST.a stp_bitvec.a stp_constantbv.a stp_sat.a \
 	stp_simplifier.a
-USEDLIBS = kleeCore.a kleeModule.a kleaverSolver.a kleaverExpr.a kleeSupport.a kleeBasic.a \
-	$(STP_LIBS)
+USEDLIBS = kleeCore.a kleeModule.a kleaverSolver.a kleaverExpr.a kleeSupport.a kleeBasic.a
+ifeq ($(ENABLE_EXT_STP),0)
+  USEDLIBS += $(STP_LIBS)
+endif
 LINK_COMPONENTS = jit bitreader bitwriter ipo linker engine
 
 include $(LEVEL)/Makefile.common
+
+ifeq ($(ENABLE_EXT_STP),1)
+  LIBS += -lstp
+endif