about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-04-07 00:40:16 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2012-04-07 00:40:16 +0000
commitc97def2e6bc8428923c83301ab9e34d13b33d3fc (patch)
tree679b4539f2c05b8038422905b49844a3223e83d1
parentb1d7d77a2b8380833853e6bdb000f2383ddd5814 (diff)
downloadklee-c97def2e6bc8428923c83301ab9e34d13b33d3fc.tar.gz
Fix unittests build when using external STP.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@154236 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--unittests/Expr/Makefile12
-rw-r--r--unittests/Solver/Makefile12
2 files changed, 18 insertions, 6 deletions
diff --git a/unittests/Expr/Makefile b/unittests/Expr/Makefile
index 5ea581b4..cfd7d0c0 100644
--- a/unittests/Expr/Makefile
+++ b/unittests/Expr/Makefile
@@ -1,13 +1,19 @@
 ##===- unittests/Expr/Makefile -----------------------------*- Makefile -*-===##
 
 LEVEL := ../..
+include $(LEVEL)/Makefile.config
+
 TESTNAME := Expr
 STP_LIBS := stp_c_interface.a stp_AST.a stp_bitvec.a \
             stp_constantbv.a stp_sat.a stp_simplifier.a
-USEDLIBS := kleaverExpr.a kleeBasic.a $(STP_LIBS)
+USEDLIBS := kleaverExpr.a kleeBasic.a
+ifeq ($(ENABLE_EXT_STP),0)
+  USEDLIBS += $(STP_LIBS)
+endif
 LINK_COMPONENTS := support
 
-include $(LEVEL)/Makefile.config
 include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
 
-
+ifeq ($(ENABLE_EXT_STP),1)
+  LIBS += -lstp
+endif
diff --git a/unittests/Solver/Makefile b/unittests/Solver/Makefile
index 44c965ba..86283d24 100644
--- a/unittests/Solver/Makefile
+++ b/unittests/Solver/Makefile
@@ -1,13 +1,19 @@
 ##===- unittests/Solver/Makefile ---------------------------*- Makefile -*-===##
 
 LEVEL := ../..
+include $(LEVEL)/Makefile.config
+
 TESTNAME := Solver
 STP_LIBS := stp_c_interface.a stp_AST.a stp_bitvec.a \
             stp_constantbv.a stp_sat.a stp_simplifier.a
-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.config
 include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
 
-#LIBS += -lstp 
+ifeq ($(ENABLE_EXT_STP),1)
+  LIBS += -lstp
+endif