https://github.com/project-everest/hacl-star
Tip revision: 366d702cfaa2afdce0fdd013a06ea27cb6477246 authored by Chris Hawblitzel on 06 February 2019, 19:48:41 UTC
In valedepend.py, put importFStarTypes arguments in dependencies rather
In valedepend.py, put importFStarTypes arguments in dependencies rather
Tip revision: 366d702
Makefile.prepare
HACL_HOME ?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
Z3_HOME ?= $(HACL_HOME)/dependencies/z3
FSTAR_HOME ?= $(HACL_HOME)/dependencies/FStar
KREMLIN_HOME ?= $(HACL_HOME)/dependencies/kremlin
#
# Installation helper
#
UNAME := $(shell uname)
ifeq ($(OS),Windows_NT)
VERSION_OCAML=4.03.2
VERSION_Z3=4.5.1.1f29cebd4df6-x64-win
endif
ifeq ($(UNAME),Darwin)
VERSION_OCAML=4.04.2
VERSION_Z3=4.5.1.1f29cebd4df6-x64-osx-10.11.6
endif
ifeq ($(UNAME),Linux)
VERSION_OCAML=4.05.0
VERSION_Z3=4.5.1.1f29cebd4df6-x64-ubuntu-14.04
endif
VERSION_KREMLIN=4064311aba2c365c7f229f7c5d2118648d29cb41
.prepare:
mkdir -p $(HACL_HOME)/dependencies
prepare: .prepare
$(MAKE) prepare-ocaml
$(MAKE) prepare-z3
$(MAKE) prepare-fstar
$(MAKE) prepare-kremlin
$(MAKE) .prepare-ocaml-display-done
$(MAKE) .prepare-z3-display-done
$(MAKE) .prepare-fstar-display-done
$(MAKE) .prepare-kremlin-display-done
prepare-ocaml: .prepare
@echo "# Installing OCaml packages required by F*"
opam switch $(VERSION_OCAML)
opam install ocamlfind batteries sqlite3 fileutils stdint zarith yojson pprint menhir ulex
@echo "# Installing OCaml packages required by KreMLin"
opam install ppx_deriving_yojson zarith pprint menhir process fix wasm
prepare-z3: .prepare
@echo "# Installing Z3 required by F*"
cd $(HACL_HOME)/dependencies && \
rm -rf $(HACL_HOME)/dependencies/z3 && \
rm -rf $(HACL_HOME)/dependencies/z3-$(VERSION_Z3) && \
wget https://github.com/FStarLang/binaries/raw/master/z3-tested/z3-$(VERSION_Z3).zip && \
unzip z3-$(VERSION_Z3).zip && \
rm -rf z3-$(VERSION_Z3).zip && \
mv z3-$(VERSION_Z3) $(Z3_HOME)
$(MAKE) .prepare-z3-display-done
prepare-fstar: .prepare
@echo "# Installing F*"
cd $(HACL_HOME)/dependencies && \
rm -rf $(HACL_HOME)/dependencies/FStar && \
git clone https://github.com/FStarLang/FStar.git
cd $(HACL_HOME)/dependencies/FStar && \
git checkout stable && \
opam config exec -- make -C src/ocaml-output -j && \
opam config exec -- make -C ulib/ml
$(MAKE) .prepare-fstar-display-done
prepare-kremlin: .prepare
@echo "# Installing Kremlin"
cd $(HACL_HOME)/dependencies && \
rm -rf $(HACL_HOME)/dependencies/kremlin && \
git clone https://github.com/FStarLang/kremlin.git
cd $(HACL_HOME)/dependencies/kremlin && \
git checkout $(VERSION_KREMLIN) && \
opam config exec -- make
$(MAKE) .prepare-kremlin-display-done
prepare-clean:
@echo "# Removing all dependencies"
rm -rf dependencies
@echo "Done ! Do not forget to remove your environnement variables"
.prepare-ocaml-display-done:
@echo "Done: Installing OCaml"
.prepare-kremlin-display-done:
@echo "Done (Install KreMLin) !\nPlease set an environnment variable KREMLIN_HOME to\n'$(KREMLIN_HOME)'\n"
.prepare-fstar-display-done:
@echo "Done (Install FStar) !\nPlease set an environnment variable FSTAR_HOME to\n'$(FSTAR_HOME)'\n"
.prepare-z3-display-done:
@echo "Done (Install Z3) !\nPlease add the Z3 executable to your PATH\n"