mirror of
https://github.com/Z3Prover/z3
synced 2025-08-04 10:20:23 +00:00
added build and test scripts and READMEs to distribute
This commit is contained in:
parent
6e1eb7044b
commit
83e92c2dd7
12 changed files with 192 additions and 0 deletions
31
ml/build-lib.sh
Normal file
31
ml/build-lib.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to compile the Z3 OCaml API
|
||||
# Expects to find ../lib/libz3{,_dbg}.{a,so,dylib}
|
||||
|
||||
CFLAGS="-ccopt -Wno-discard-qual -ccopt -I../include"
|
||||
XCDBG="-g -ccopt -g $CFLAGS"
|
||||
XCOPT="-ccopt -O3 -ccopt -fomit-frame-pointer $CFLAGS"
|
||||
|
||||
|
||||
ocamlc -c $XCDBG z3_stubs.c z3_theory_stubs.c z3.mli z3.ml
|
||||
|
||||
ocamlopt -c $XCDBG z3_stubs.c z3_theory_stubs.c z3.mli z3.ml
|
||||
|
||||
ar rcs libz3stubs_dbg.a z3.o z3_stubs.o z3_theory_stubs.o
|
||||
|
||||
ocamlopt -c $XCOPT z3_stubs.c z3_theory_stubs.c z3.mli z3.ml
|
||||
|
||||
ar rcs libz3stubs.a z3.o z3_stubs.o z3_theory_stubs.o
|
||||
|
||||
ocamlc -custom -a $XCDBG -cclib -L$PWD/../lib -cclib -lz3_dbg -cclib -lcamlidl -cclib -lz3stubs_dbg z3.cmo -o z3_dbg.cma
|
||||
|
||||
ocamlc -custom -a $XCDBG -cclib -L$PWD/../lib -cclib -lz3 -cclib -lcamlidl -cclib -lz3stubs z3.cmo -o z3.cma
|
||||
|
||||
ocamlopt -a $XCDBG -cclib -L$PWD/../lib -cclib -lz3_dbg -cclib -lcamlidl -cclib -lz3stubs_dbg z3.cmx -o z3_dbg.cmxa
|
||||
|
||||
ocamlopt -a $XCOPT -cclib -L$PWD/../lib -cclib -lz3 -cclib -lcamlidl -cclib -lz3stubs z3.cmx -o z3.cmxa
|
||||
|
||||
ocamlmktop -o ocamlz3 z3.cma -cclib -L.
|
||||
|
||||
rm z3.cm{o,x} *.o
|
Loading…
Add table
Add a link
Reference in a new issue