2017-12-30 19:06:07 +01:00
|
|
|
.NOPARALLEL:
|
|
|
|
|
2019-03-18 12:41:32 +01:00
|
|
|
INCLUDE_DIRS=Parallel,Nuclei,Utils,Basis,SCF,MOBasis,CI,F12,Perturbation
|
2017-12-30 19:06:07 +01:00
|
|
|
LIBS=
|
|
|
|
PKGS=
|
2019-01-15 15:17:34 +01:00
|
|
|
OCAMLBUILD=ocamlbuild -j 0 -cflags $(ocamlcflags) -lflags $(ocamllflags) $(ocamldocflags) -Is $(INCLUDE_DIRS) -ocamlopt $(ocamloptflags) $(mpi)
|
2018-03-28 01:50:19 +02:00
|
|
|
|
2019-02-20 18:15:15 +01:00
|
|
|
MLLFILES=$(filter-out $(wildcard _build/*), $(wildcard */*.mll) $(wildcard *.mll)) Utils/math_functions.c
|
|
|
|
MLYFILES=$(filter-out $(wildcard _build/*), $(wildcard */*.mly) $(wildcard *.mly))
|
|
|
|
MLFILES= $(filter-out $(wildcard Parallel_*/*) $(wildcard _build/*), $(wildcard */*.ml) $(wildcard *.ml) )
|
|
|
|
MLIFILES=$(filter-out $(wildcard Parallel_*/*) $(wildcard _build/*), $(wildcard */*.mli) $(wildcard *.mli) )
|
2018-03-28 01:50:19 +02:00
|
|
|
|
2018-02-24 23:57:38 +01:00
|
|
|
ALL_NATIVE=$(patsubst %.ml,%.native,$(wildcard run_*.ml))
|
|
|
|
ALL_BYTE=$(patsubst %.ml,%.byte,$(wildcard run_*.ml))
|
|
|
|
ALL_EXE=$(ALL_BYTE) $(ALL_NATIVE)
|
2017-12-30 19:06:07 +01:00
|
|
|
|
2018-03-28 01:50:19 +02:00
|
|
|
.PHONY: default doc
|
2017-12-30 19:06:07 +01:00
|
|
|
|
2019-02-20 18:15:15 +01:00
|
|
|
|
2018-03-28 01:50:19 +02:00
|
|
|
default: $(ALL_EXE) doc
|
2018-01-17 15:56:57 +01:00
|
|
|
|
2018-07-04 20:24:51 +02:00
|
|
|
tests: run_tests.native
|
2017-12-30 19:06:07 +01:00
|
|
|
|
2018-03-28 01:50:19 +02:00
|
|
|
QCaml.odocl: $(MLIFILES)
|
|
|
|
ls $(MLIFILES) | sed "s/\.mli//" > QCaml.odocl
|
2017-12-30 19:06:07 +01:00
|
|
|
|
2018-03-28 01:50:19 +02:00
|
|
|
doc: QCaml.odocl
|
|
|
|
$(OCAMLBUILD) QCaml.docdir/index.html -use-ocamlfind $(PKGS)
|
2017-12-30 19:06:07 +01:00
|
|
|
|
|
|
|
%.inferred.mli: $(MLFILES)
|
|
|
|
$(OCAMLBUILD) $*.inferred.mli -use-ocamlfind $(PKGS)
|
|
|
|
mv _build/$*.inferred.mli .
|
|
|
|
|
|
|
|
%.byte: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
|
|
|
rm -f -- $*
|
2018-01-17 15:56:57 +01:00
|
|
|
$(OCAMLBUILD) $*.byte -use-ocamlfind $(PKGS)
|
2017-12-30 19:06:07 +01:00
|
|
|
|
2018-01-20 12:10:32 +01:00
|
|
|
%.native: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
2017-12-30 19:06:07 +01:00
|
|
|
rm -f -- $*
|
|
|
|
$(OCAMLBUILD) $*.native -use-ocamlfind $(PKGS)
|
|
|
|
ln -s $*.native $*
|
|
|
|
|
2018-02-02 00:04:35 +01:00
|
|
|
%.p.native: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
|
|
|
rm -f -- $*
|
|
|
|
$(OCAMLBUILD) $*.p.native -use-ocamlfind $(PKGS)
|
|
|
|
|
2018-02-02 01:25:10 +01:00
|
|
|
%.p.byte: $(MLFILES) $(MLIFILES) $(MLLFILES) $(MLYFILES)
|
|
|
|
rm -f -- $*
|
|
|
|
$(OCAMLBUILD) -ocamlc ocamlcp $*.byte -use-ocamlfind $(PKGS)
|
|
|
|
|
2017-12-30 19:06:07 +01:00
|
|
|
clean:
|
2019-03-08 17:47:58 +01:00
|
|
|
rm -f QCaml.odocl && $(OCAMLBUILD) -clean
|
2017-12-30 19:06:07 +01:00
|
|
|
|
2018-01-29 22:48:09 +01:00
|
|
|
debug: run_integrals.native
|
2018-02-01 16:09:04 +01:00
|
|
|
./debug.sh
|
2018-03-28 01:50:19 +02:00
|
|
|
|
|
|
|
install: $(ALL_NATIVE)
|
|
|
|
cp run_hartree_fock.native $(bin)/run_hartree_fock
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(bin)/run_hartree_fock
|