mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-07 06:33:39 +01:00
65 lines
1.9 KiB
Makefile
65 lines
1.9 KiB
Makefile
.NOPARALLEL:
|
|
|
|
INCLUDE_DIRS=Parallel,Nuclei,Utils,Basis,SCF,MOBasis,CI,F12,Perturbation
|
|
LIBS=
|
|
PKGS=
|
|
OCAMLBUILD=ocamlbuild -j 0 -cflags $(ocamlcflags) -lflags $(ocamllflags) $(ocamldocflags) -Is $(INCLUDE_DIRS) -ocamlopt $(ocamloptflags) $(mpi)
|
|
|
|
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) )
|
|
|
|
ALL_NATIVE=$(patsubst %.ml,%.native,$(wildcard run_*.ml))
|
|
ALL_BYTE=$(patsubst %.ml,%.byte,$(wildcard run_*.ml))
|
|
ALL_EXE=$(ALL_BYTE) $(ALL_NATIVE)
|
|
|
|
.PHONY: default doc
|
|
|
|
|
|
default: $(ALL_EXE)
|
|
|
|
tests: run_tests.native
|
|
|
|
bytelib:
|
|
ocamlmklib -o bytelib ./_build/Utils/Util.cmo
|
|
|
|
QCaml.odocl: $(MLIFILES)
|
|
ls $(MLIFILES) | sed "s/\.mli//" > QCaml.odocl
|
|
|
|
doc: QCaml.odocl
|
|
$(OCAMLBUILD) QCaml.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:
|
|
rm -f QCaml.odocl && $(OCAMLBUILD) -clean
|
|
|
|
debug: run_integrals.native
|
|
./debug.sh
|
|
|
|
install: $(ALL_NATIVE)
|
|
cp run_hartree_fock.native $(bin)/run_hartree_fock
|
|
|
|
uninstall:
|
|
rm -f $(bin)/run_hartree_fock
|