Main.or files from MiniSAT, since we don't need them, and they bring
in main() functions and zlib dependencies we don't want. Add a c-api
test to try to keep this from regressing again.
Make it easier to pass -fPIC through to the MiniSAT build.
Clean up some comments and trailing whitespace in Makefiles.
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1036
e59a4935-1847-0410-ae03-
e826735625c1
#2) You need STP to use about half the memory.
#CFLAGS_M32 = -m32
+# If you're compiling a 64-bit version of STP, and you want to use
+# libstp.a in a shared library, you need the -fPIC option.
+#CFLAGS_FPIC = -fPIC
+CFLAGS_FPIC =
+
#-fno-inline
CFLAGS_BASE = $(OPTIMIZE)
CFLAGS_BASE = $(OPTIMIZE)
CFLAGS = -isysroot $(UNIVERSAL_SDK) $(UNIVERSAL_ARCH) $(CFLAGS_BASE)
else
LDFLAGS = $(LDFLAGS_BASE)
- CFLAGS = $(CFLAGS_BASE)
- CFLAGS = $(CFLAGS_BASE) $(CFLAGS_M32) -I../AST
+ CFLAGS = $(CFLAGS_BASE) $(CFLAGS_M32) $(CFLAGS_FPIC) -I../AST
endif
# Used by Doug Lea's malloc that I added into minisat2.
$(SRC)/to-sat/*.o \
$(SRC)/to-sat/AIG/*.o \
$(SRC)/sat/*.o \
- $(SRC)/sat/core/*.o? \
- $(SRC)/sat/simp/*.o? \
+ $(SRC)/sat/core/Solver.or \
+ $(SRC)/sat/simp/SimpSolver.or \
$(SRC)/sat/utils/*.o \
$(SRC)/simplifier/*.o \
$(SRC)/simplifier/constantBitP/*.o \
$(MAKE) regresscrypto
$(MAKE) unit_test
$(MAKE) regresscapi
-
+
# Checks that simplifications are working.
.PHONY: unit_test
.PHONY:core
core: $(OBJS)
- #Command line variables override those set in the makefile.
- $(MAKE) -C core libr COPTIMIZE="$(CFLAGS_M32) -O3"
- $(MAKE) -C simp libr COPTIMIZE="$(CFLAGS_M32) -O3"
+ @ #Command line variables override those set in the makefile.
+ $(MAKE) -C core libr COPTIMIZE="$(CFLAGS_M32) $(CFLAGS_FPIC) -O3"
+ $(MAKE) -C simp libr COPTIMIZE="$(CFLAGS_M32) $(CFLAGS_FPIC) -O3"
$(MAKE) -C cryptominisat2 lib all
-
+ @#
rm -f $(LIB)
ar cq $(LIB) ./core/*.or ./simp/*.or *.o utils/*.o *.o
ranlib $(LIB)
# either leak, or use of unitialised values.
TOP = ../..
include $(TOP)/scripts/Makefile.common
-CXXFLAGS= -DEXT_HASH_MAP $(CFLAGS) -I../../src/c_interface -L../../lib
-LIBS= -lstp
+CXXFLAGS= -DEXT_HASH_MAP $(CFLAGS) -I../../src/c_interface
+LDFLAGS=-L../../lib
+LIBS=$(LDFLAGS) -lstp
VALGRINDPATH=`which valgrind`
ifeq "$(VALGRINDPATH)" ""
endif
-all: 0 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 22
+all: 0 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 22 23
rm -rf *.out
0:
g++ $(CXXFLAGS) parsestring-using-cinterface.c -o a22.out $(LIBS)
./a22.out
+# Test 23 is the same as test 0, except linked in a different order.
+# This is meant to catch problems in which libstp.a contains a
+# main() function or has extra dependencies.
+23:
+ g++ $(CXXFLAGS) -o a23.out \
+ ../../lib/libstp.a array-cvcl-02.c ../../lib/libstp.a
+ ./a23.out
+
+
clean:
rm -rf *~ *.out