Something went wrong. Try again.
READ-ONLY MIRROR of the previous soteria repo
Something went wrong. Try again.
soteria Makefile
2.2 kB · 98 lines
Makefile
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798OPAM=opamOPAMX=$(OPAM) exec --DUNE=$(OPAMX) duneWHICHX=$(DUNE) exec -- which
YARN=yarn
DYLIB_LIST_FILE=packaging/macOS_dylibs.txtPACKAGING_BIN=$(DUNE) exec -- packaging/package.exeSOTERIA_C_BIN=_build/install/default/bin/soteria-cVSCODE_BC_JS=vscode/src/soteria_vscode.bc.js
PACKAGE_DIST=packageVSCODE_DIST=dist
##### Normal ocaml stuff #####.PHONY: ocamlocaml: $(DUNE) build ocaml-format-check: $(DUNE) build @fmt
.PHONY: ocaml-testocaml-test: $(DUNE) test ##### Packaging soteria-c #####
# From inside the package folder one can run:# SOTERIA_Z3_PATH=./bin/z3 DYLD_LIBRARY_PATH=./lib:$DYLD_LIBRARY_PATH ./bin/soteria-c exec-main file.c.PHONY: packagepackage: ocaml packaging/bin-locations.txt packaging/macOS_dylibs.txt $(DUNE) build @dylist-file $(PACKAGING_BIN) copy-files $(DYLIB_LIST_FILE) $(PACKAGE_DIST)/lib $(PACKAGING_BIN) copy-files packaging/bin-locations.txt $(PACKAGE_DIST)/bin mkdir -p $(PACKAGE_DIST)/lib $(PACKAGING_BIN) copy-cerb-runtime $(PACKAGE_DIST)/lib $(PACKAGING_BIN) copy-soteria-c-auto-includes $(PACKAGE_DIST)/lib/
packaging/bin-locations.txt: $(WHICHX) soteria-c > $@ $(WHICHX) z3 >> $@
packaging/macOS_dylibs.txt: $(PACKAGING_BIN) infer-dylibs $(SOTERIA_C_BIN) > $@
##### Switch creation / dependency setup #####
.PHONY: switchswitch: $(OPAM) switch create . ocaml-base-compiler.5.3.0 --deps-only --with-test --with-doc -y $(OPAM) install ocaml-lsp-server odig ocamlformat -y .PHONY: ocaml-depsocaml-deps: $(OPAM) install . --deps-only --with-test --with-doc $(OPAM) install ocamlformat.0.27.0
##### JavaScript stuff #####
.PHONY: npm-depsnpm-deps: $(YARN) install --immutable .PHONY: vscode-reinstall-devvscode-reinstall-dev: vscode-package $(YARN) install-ext .PHONY: vscode-packagevscode-package: vscode $(YARN) package .PHONY: vscodevscode: js-bundle
.PHONY: js-bundlejs-bundle: vscode-ocaml $(YARN) compile
.PHONY: vscode-ocamlvscode-ocaml: $(DUNE) build $(VSCODE_BC_JS) .PHONY: for-localfor-local: ocaml vscode .PHONY: cleanclean: $(DUNE) clean rm -rf $(PACKAGE_DIST) rm -rf $(VSCODE_DIST) rm -rf packaging/bin-locations.txt packaging/macOS_dylibs.txt rm -f soteria-vscode.vsix