mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-19 04:22:21 +01:00
61 lines
1.6 KiB
Makefile
61 lines
1.6 KiB
Makefile
.NOPARALLEL:
|
|
|
|
INCLUDE_DIRS=Nuclei,Utils,Basis,SCF
|
|
LIBS=
|
|
PKGS=
|
|
OCAMLBUILD=ocamlbuild -j 0 -cflags $(ocamlcflags) -lflags $(ocamlcflags) $(ocamldocflags) -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 doc
|
|
|
|
default: $(ALL_EXE) doc
|
|
|
|
tests: run_tests.native
|
|
|
|
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:
|
|
$(OCAMLBUILD) -clean # rm -rf _build $(ALL_EXE) *.native *.byte
|
|
|
|
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
|