Skip to content

Instantly share code, notes, and snippets.

@MisterDA
Last active January 3, 2017 13:27
Show Gist options
  • Save MisterDA/50cba6b860f8404399dc0d947e0e63d1 to your computer and use it in GitHub Desktop.
Save MisterDA/50cba6b860f8404399dc0d947e0e63d1 to your computer and use it in GitHub Desktop.
Voronoï Makefile
all: build
build:
ocamlbuild -pkg graphics project.native -I src
rapport: build
ocamldoc -latex -charset "utf-8" -noheader -notoc -notrailer \
-colorize-code -o rapport/ocamldoc.tex -d rapport -I _build/src \
src/voronoi.ml src/project.ml
pdflatex -output-format pdf -output-directory rapport rapport/rapport.tex
dist: rapport
base=$$(basename "$${PWD}") && name='decimo-zibulski' && cd .. && \
tar -c --exclude-vcs --exclude-vcs-ignores -zvf "$${name}.tar.gz" \
--transform="s,^$${base},$${name},g" --show-transformed-names \
--exclude="_build" --exclude='ocamldoc.*' --exclude-caches \
"$${base}"
clean:
ocamlbuild -clean
rm -rf rapport/*.aux rapport/*.log rapport/ocamldoc.*
.PHONY: build dist rapport clean
OCAMLC=ocamlopt.opt # native (ocamlopt)
# OCAMLC=ocamlc.opt # bytecode (ocamlc)
all: build
build:
$(OCAMLC) -c voronoi.ml
$(OCAMLC) -c examples.ml
$(OCAMLC) -c sat_solver.mli
$(OCAMLC) -c sat_solver.ml
$(OCAMLC) -c project.ml
$(OCAMLC) -o projet graphics.cmxa voronoi.cmx examples.cmx sat_solver.cmx project.cmx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment