diff --git a/maxsat/README-external.txt b/maxsat/README-external.txt index ea7de14fa..bfef1acaa 100644 --- a/maxsat/README-external.txt +++ b/maxsat/README-external.txt @@ -1,12 +1,12 @@ -WARNING: this example still uses the old Z3 (version 3.x) C API. The current version is backward compatible. +WARNING: this example still uses the old Z3 (version 3.x) C API. +The current version is backward compatible. This directory contains scripts to build the MaxSAT application using Microsoft C compiler, or gcc. -1) Using Microsoft C compiler +1) Using Microsoft C compiler (with binary release) -Use 'build.cmd' to build the MaxSAT application using Microsoft C -compiler. +Use 'build.cmd' to build the MaxSAT application using Microsoft C compiler. Remark: The Microsoft C compiler (cl) must be in your path, or you can use the Visual Studio Command Prompt. @@ -14,12 +14,3 @@ or you can use the Visual Studio Command Prompt. The script 'exec.cmd' adds the bin directory to the path. So, maxsat.exe can find z3.dll. - -2) Using gcc - -Use 'build.sh' to build the MaxSAT application using gcc. -The script 'exec.sh' adds the bin directory to the path. So, -maxsat.exe can find z3.dll. - -Remark: the scripts 'build.sh' and 'exec.sh' assumes you are in a -Cygwin or Mingw shell. diff --git a/maxsat/README-linux.txt b/maxsat/README-linux.txt deleted file mode 100644 index a575dbf21..000000000 --- a/maxsat/README-linux.txt +++ /dev/null @@ -1,8 +0,0 @@ -WARNING: this example still uses the old Z3 (version 3.x) C API. The current version is backward compatible. - -This directory contains scripts to build the MaxSAT application using gcc. - -Use 'build.sh' to build the MaxSAT application using gcc. -The script 'exec.sh' adds the lib directory to the path. So, -maxsat can find libz3.so. - diff --git a/maxsat/README-osx.txt b/maxsat/README-osx.txt deleted file mode 100644 index c969b2516..000000000 --- a/maxsat/README-osx.txt +++ /dev/null @@ -1,8 +0,0 @@ -WARNING: this example still uses the old Z3 (version 3.x) C API. The current version is backward compatible. - -This directory contains scripts to build the MaxSAT application using gcc. - -Use 'build.sh' to build the MaxSAT application using gcc. -The script 'exec.sh' adds the lib directory to the path. So, -maxsat can find libz3.dylib. - diff --git a/maxsat/README.txt b/maxsat/README.txt new file mode 100644 index 000000000..0e9e19077 --- /dev/null +++ b/maxsat/README.txt @@ -0,0 +1,21 @@ +WARNING: this example still uses the old Z3 (version 3.x) C API. +The current version is backward compatible. + +This directory contains scripts to build the MaxSAT application using +Microsoft C compiler, or gcc. + +1) Using Visual Studio (with Z3 source code release) + +Use the maxsat.vcxproj project file. + +2) Using gcc (on Linux or OSX) + +Use 'build.sh' to build the MaxSAT application using gcc. + +You must install Z3 before running this example. +To install Z3, execute the following command in the Z3 root directory. + + sudo make install + +Use 'build.sh' to build the test application using gcc. +It generates the executable 'maxsat'. diff --git a/maxsat/build-external-linux.sh b/maxsat/build-external-linux.sh deleted file mode 100644 index 9074e5a3f..000000000 --- a/maxsat/build-external-linux.sh +++ /dev/null @@ -1 +0,0 @@ -gcc -fopenmp -o maxsat maxsat.c -I ../../include -L ../../lib -lz3 diff --git a/maxsat/build-external-osx.sh b/maxsat/build-external-osx.sh deleted file mode 100644 index eca55574e..000000000 --- a/maxsat/build-external-osx.sh +++ /dev/null @@ -1 +0,0 @@ -gcc -fopenmp -o maxsat maxsat.c -I ../../include -L ../../lib -lz3 diff --git a/maxsat/build-external.sh b/maxsat/build-external.sh deleted file mode 100644 index 4be278a14..000000000 --- a/maxsat/build-external.sh +++ /dev/null @@ -1 +0,0 @@ -gcc -o maxsat.exe -I ../../include ../../bin/z3.dll maxsat.c diff --git a/maxsat/build-static-linux.sh b/maxsat/build-static-linux.sh deleted file mode 100644 index 3b6a2bbe8..000000000 --- a/maxsat/build-static-linux.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Note: Z3 was built using C++, so libz3.a has C++ dependencies. -# You can use gcc to link the program, but you need tell it -# to link the C++ libraries -g++ -fopenmp -static -I../../include -L../../lib maxsat.c -lz3 -o maxsat diff --git a/maxsat/build-static-osx.sh b/maxsat/build-static-osx.sh deleted file mode 100644 index 1a54e0355..000000000 --- a/maxsat/build-static-osx.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Note: Z3 was built using C++, so libz3.a has C++ dependencies. -# You can use gcc to link the program, but you need tell it -# to link the C++ libraries -g++ -fopenmp -I../../include maxsat.c ../../lib/libz3.a -o maxsat diff --git a/maxsat/build.sh b/maxsat/build.sh new file mode 100755 index 000000000..22770c134 --- /dev/null +++ b/maxsat/build.sh @@ -0,0 +1,9 @@ +if gcc -fopenmp -o maxsat maxsat.c -lz3; then + echo "maxsat example was successfully compiled." + echo "To run example, execute:" + echo " ./maxsat ex.smt" +else + echo "You must install Z3 before compiling this example." + echo "To install Z3, execute the following command in the Z3 root directory." + echo " sudo make install" +fi diff --git a/maxsat/exec-external-linux.sh b/maxsat/exec-external-linux.sh deleted file mode 100644 index e366b5570..000000000 --- a/maxsat/exec-external-linux.sh +++ /dev/null @@ -1,2 +0,0 @@ -export LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH -./maxsat $1 diff --git a/maxsat/exec-external-osx.sh b/maxsat/exec-external-osx.sh deleted file mode 100644 index e1df46aaa..000000000 --- a/maxsat/exec-external-osx.sh +++ /dev/null @@ -1,2 +0,0 @@ -export DYLD_LIBRARY_PATH=../../lib:$DYLD_LIBRARY_PATH -./maxsat $1 diff --git a/maxsat/exec-external.sh b/maxsat/exec-external.sh deleted file mode 100644 index 6b2815614..000000000 --- a/maxsat/exec-external.sh +++ /dev/null @@ -1,2 +0,0 @@ -export PATH=../../bin:$PATH -./maxsat.exe $1