Skip to content
Snippets Groups Projects
Commit 53d83117 authored by Johannes Kanig's avatar Johannes Kanig Committed by François Bobot
Browse files

Extract from .gitlab.yml the compilation steps

parent 24d57af4
No related branches found
No related tags found
No related merge requests found
Pipeline #25621 failed
......@@ -29,16 +29,10 @@ tests_with_recompilation:
#OCaml dependencies
- opam depext --install dune zarith num ocplib-simplex parsexp
#OCaml compilation
- (cd Src/COLIBRI/simplex_ocaml; ECLIPSEBIN=$(pwd)/../../../Bin dune build simplex_ocaml_mod_v7.so simplex_ocaml.pl)
#Copy OCaml targets
- (cd Src/COLIBRI/simplex_ocaml; cp _build/default/simplex_ocaml.pl ..)
- (cd Src/COLIBRI/simplex_ocaml; cp _build/default/simplex_ocaml_mod_v7.so ../lib/v7/x86_64_linux/simplex_ocaml.so)
#C++ compilation and targets copying
- (cd Src/Floats; g++ -fPIC -O -D__LINUX__ -I ../../Bin/ECLIPSE_V7.0_45/include/x86_64_linux -shared EclipseInterfaceSimFloat2.2.cpp Floatcpp-3.0_SimFloat2.2.cpp -o ../COLIBRI/lib/v7/x86_64_linux/float_util.so)
#Eclipse Prolog compilation of COLIBRI
- ./compile_colibri.sh
- make ECLIPSEBIN=$(pwd)/../../../Bin
#Bundle in bundle directory
- ./bundle.sh
- cp -ra Bin/ECLIPSE_V7.0_45/ bundle/ECLIPSE/
- ./bundle.sh bundle
#Test
- sudo apt-get update
- sudo apt-get install -y parallel
......
Makefile 0 → 100644
.PHONY: build
PREFIX=
ECLIPSEBIN=
build:
rm -f Src/COLIBRI/lib/v7/x86_64_linux/* Src/COLIBRI/simplex_ocaml.pl
(cd Src/COLIBRI/simplex_ocaml; ECLIPSEBIN=$(ECLIPSEBIN) dune build simplex_ocaml_mod_v7.so simplex_ocaml.pl)
(cd Src/COLIBRI/simplex_ocaml; cp _build/default/simplex_ocaml.pl ..)
(cd Src/COLIBRI/simplex_ocaml; cp _build/default/simplex_ocaml_mod_v7.so ../lib/v7/x86_64_linux/simplex_ocaml.so)
(cd Src/Floats; g++ -fPIC -O -D__LINUX__ -I ../../Bin/ECLIPSE_V7.0_45/include/x86_64_linux -shared EclipseInterfaceSimFloat2.2.cpp Floatcpp-3.0_SimFloat2.2.cpp -o ../COLIBRI/lib/v7/x86_64_linux/float_util.so)
./compile_colibri.sh
install:
./bundle.sh $(PREFIX)
......@@ -2,7 +2,7 @@
In order to create a bundle of everything needed to run COLIBRI. run
`compile_colibri.sh` then run `./bundle.sh` it will create
`./compile_colibri.sh` then run `./bundle.sh` it will create
a relocalisable directory `bundle`.
......
......@@ -845,18 +845,18 @@ let output_stub filename =
let cout = open_out (filename^"_header_include_v5.sexp") in
if Sys.word_size = 64
then Printf.fprintf cout
"\"-I%s/ECLiPSe_5.10/include/x86_64_%s/\"" eclipsebin os
"\"-I%s/include/x86_64_%s/\"" eclipsebin os
else Printf.fprintf cout
"\"-I%s/ECLiPSe_5.10/include/i386_%s/\"" eclipsebin os;
"\"-I%s/nclude/i386_%s/\"" eclipsebin os;
close_out cout;
let cout = open_out (filename^"_header_include_v7.sexp") in
if Sys.word_size = 64
then Printf.fprintf cout
"\"-I%s/ECLIPSE_V7.0_45/include/x86_64_%s/\"" eclipsebin os
"\"-I%s/include/x86_64_%s/\"" eclipsebin os
else Printf.fprintf cout
"\"-I%s/ECLIPSE_V7.0_45/include/i386_%s/\"" eclipsebin os;
"\"-I%s/include/i386_%s/\"" eclipsebin os;
close_out cout;
......@@ -864,9 +864,9 @@ let output_stub filename =
if os = "nt" then
if Sys.word_size = 64
then Printf.fprintf cout
"(\"-L%s/ECLiPSe_5.10/lib/x86_64_nt/\" -leclipse)" eclipsebin
"(\"-L%s/lib/x86_64_nt/\" -leclipse)" eclipsebin
else Printf.fprintf cout
"(\"-L%s/ECLiPSe_5.10/lib/i386_nt/\" -leclipse)" eclipsebin
"(\"-L%s/lib/i386_nt/\" -leclipse)" eclipsebin
else
Printf.fprintf cout "()";
......@@ -874,9 +874,9 @@ let output_stub filename =
if os = "nt" then
if Sys.word_size = 64
then Printf.fprintf cout
"(\"-L%s/ECLIPSE_V7.0_45/lib/x86_64_nt/\" -leclipse)" eclipsebin
"(\"-L%s/lib/x86_64_nt/\" -leclipse)" eclipsebin
else Printf.fprintf cout
"(\"-L%s/ECLIPSE_V7.0_45/lib/i386_nt/\" -leclipse)" eclipsebin
"(\"-L%s/lib/i386_nt/\" -leclipse)" eclipsebin
else
Printf.fprintf cout "()";
......
#!/bin/sh
rm -fr bundle
mkdir -p bundle/COLIBRI/lib/
PREFIX=$1
rm -fr $PREFIX
mkdir -p $PREFIX/COLIBRI/lib/
cp -ra Bin/ECLIPSE_V7.0_45/ bundle/ECLIPSE/
cp -ra Src/COLIBRI/lib/v7 bundle/COLIBRI/lib/
cp -ra Src/COLIBRI/col_solve.eco Src/COLIBRI/filter_smtlib_file Src/COLIBRI/filter_smtlib_file.exe bundle/COLIBRI/
cp -ra compile_flag.pl bundle/COLIBRI/
cp -ra version bundle
cp -ra colibri_for_bundle.sh bundle/colibri
chmod u+x bundle/colibri
cp -ra Bin/ECLIPSE_V7.0_45/ $PREFIX/ECLIPSE/
cp -ra Src/COLIBRI/lib/v7 $PREFIX/COLIBRI/lib/
cp -ra Src/COLIBRI/col_solve.eco Src/COLIBRI/filter_smtlib_file Src/COLIBRI/filter_smtlib_file.exe $PREFIX/COLIBRI/
cp -ra compile_flag.pl $PREFIX/COLIBRI/
cp -ra version $PREFIX
cp -ra colibri_for_bundle.sh $PREFIX/colibri
chmod u+x $PREFIX/colibri
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment