mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-18 12:03:40 +01:00
57 lines
1.7 KiB
Makefile
57 lines
1.7 KiB
Makefile
.NOPARALLEL:
|
|
|
|
INCLUDE_DIRS=Nuclei,Utils,Basis,HartreeFock
|
|
LIBS=
|
|
PKGS=
|
|
OCAMLCFLAGS="-g -warn-error A"
|
|
OCAMLOPTFLAGS="opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100"
|
|
#ODOC_LTXHTML_DIR=qpackage.docdir/ltx
|
|
ODOCFLAGS=-docflags "-g ltxhtml.cma -sort"
|
|
OCAMLBUILD=ocamlbuild -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS) $(ODOCFLAGS) -Is $(INCLUDE_DIRS) -ocamlopt $(OCAMLOPTFLAGS)
|
|
MLLFILES=$(wildcard */*.mll) $(wildcard *.mll) Utils/math_functions.c
|
|
MLYFILES=$(wildcard */*.mly) $(wildcard *.mly)
|
|
MLFILES= $(wildcard */*.ml) $(wildcard *.ml)
|
|
MLIFILES=$(wildcard */*.mli) $(wildcard *.mli)
|
|
ALL_NATIVE=$(patsubst %.ml,%.native,$(wildcard run_*.ml))
|
|
ALL_BYTE=$(patsubst %.ml,%.byte,$(wildcard run_*.ml))
|
|
ALL_EXE=$(ALL_BYTE) $(ALL_NATIVE)
|
|
|
|
.PHONY: default
|
|
|
|
default: $(ALL_EXE)
|
|
|
|
tests: $(ALL_TESTS)
|
|
|
|
qpackage.odocl: $(MLIFILES)
|
|
ls $(MLIFILES) | sed "s/\.mli//" > qpackage.odocl
|
|
|
|
doc: qpackage.odocl
|
|
$(OCAMLBUILD) qpackage.docdir/index.html -use-ocamlfind $(PKGS)
|
|
|
|
%.inferred.mli: $(MLFILES)
|
|
$(OCAMLBUILD) $*.inferred.mli -use-ocamlfind $(PKGS)
|
|
mv _build/$*.inferred.mli .
|
|
|
|
%.byte: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
|
rm -f -- $*
|
|
$(OCAMLBUILD) $*.byte -use-ocamlfind $(PKGS)
|
|
|
|
%.native: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
|
rm -f -- $*
|
|
$(OCAMLBUILD) $*.native -use-ocamlfind $(PKGS)
|
|
ln -s $*.native $*
|
|
|
|
%.p.native: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
|
rm -f -- $*
|
|
$(OCAMLBUILD) $*.p.native -use-ocamlfind $(PKGS)
|
|
|
|
%.p.byte: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
|
rm -f -- $*
|
|
$(OCAMLBUILD) -ocamlc ocamlcp $*.byte -use-ocamlfind $(PKGS)
|
|
|
|
clean:
|
|
$(OCAMLBUILD) -clean # rm -rf _build $(ALL_EXE) $(ALL_TESTS) *.native *.byte
|
|
|
|
debug: run_integrals.native
|
|
./debug.sh
|