2017-12-30 19:06:07 +01:00
|
|
|
.NOPARALLEL:
|
|
|
|
|
2017-12-31 18:27:58 +01:00
|
|
|
INCLUDE_DIRS=Nuclei,Utils,Basis
|
2017-12-30 19:06:07 +01:00
|
|
|
LIBS=
|
|
|
|
PKGS=
|
2018-01-19 18:11:03 +01:00
|
|
|
OCAMLCFLAGS="-g -warn-error A"
|
2018-01-24 16:34:50 +01:00
|
|
|
OCAMLOPTFLAGS="opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100"
|
2018-01-22 15:27:41 +01:00
|
|
|
OCAMLBUILD=ocamlbuild -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS) -Is $(INCLUDE_DIRS) -ocamlopt $(OCAMLOPTFLAGS)
|
2017-12-31 16:41:04 +01:00
|
|
|
MLLFILES=$(wildcard */*.mll) $(wildcard *.mll)
|
|
|
|
MLYFILES=$(wildcard */*.mly) $(wildcard *.mly)
|
|
|
|
MLFILES= $(wildcard */*.ml) $(wildcard *.ml)
|
|
|
|
MLIFILES=$(wildcard */*.mli) $(wildcard *.mli)
|
2018-01-18 00:21:05 +01:00
|
|
|
ALL_EXE=$(patsubst %.ml,%.native,$(wildcard run_*.ml))
|
2017-12-30 19:06:07 +01:00
|
|
|
|
|
|
|
.PHONY: default
|
|
|
|
|
2018-01-18 00:21:05 +01:00
|
|
|
default: $(ALL_EXE)
|
2018-01-17 15:56:57 +01:00
|
|
|
|
2017-12-30 19:06:07 +01:00
|
|
|
tests: $(ALL_TESTS)
|
|
|
|
|
|
|
|
qpackage.odocl: $(MLIFILES)
|
|
|
|
ls $(MLIFILES) | sed "s/\.mli//" > qpackage.odocl
|
|
|
|
|
|
|
|
doc: qpackage.odocl
|
2018-01-17 15:56:57 +01:00
|
|
|
$(OCAMLBUILD) qpackage.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
|
|
|
ln -s $*.byte $*
|
|
|
|
|
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 $*
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf _build $(ALL_EXE) $(ALL_TESTS) *.native *.byte
|
|
|
|
|
2018-01-29 22:48:09 +01:00
|
|
|
debug: run_integrals.native
|
2018-01-31 14:37:51 +01:00
|
|
|
time ./run_integrals -c h2o.xyz -b ~/quantum_package/data/basis/cc-pvtz -o /dev/shm/out ; sleep 2 ; diff /dev/shm/out.eri REF | head -50
|