4
# Edward Valeev, Eve-of-the-Fake-New-Millenium
6
# Edit this list of subdirectories whose content
7
# to be included in CINTS to suit your needs. Valid subdirs are:
15
# 8. R12_Ints (8/30/03 EFV - doesn't work anymore, transqt needs to be fixed)
20
SUBDIRS = Default_Ints OEProp_Ints Fock MP2 Default_Deriv1 Default_Deriv2 CC \
21
MP2R12 GIAO_Deriv MkPT2
24
# Some subdirectories are not completely independent - need to perform
25
# additional "dependency" checks:
26
# 1. if R12_Ints included - make sure MP2R12 is included also.
27
# 2. if Fock (DFT) is included - include DFT (Fock) as well.
29
ifeq ($(findstring R12_Ints,$(SUBDIRS)),R12_Ints)
30
ifeq ($(findstring MP2R12,$(SUBDIRS)),)
34
ifeq ($(findstring Fock,$(SUBDIRS)),Fock)
35
ifeq ($(findstring DFT,$(SUBDIRS)),)
39
ifeq ($(findstring DFT,$(SUBDIRS)),DFT)
43
ifeq ($(findstring Default_Deriv2,$(SUBDIRS)),Default_Deriv2)
44
ifeq ($(findstring Default_Deriv1,$(SUBDIRS)),)
45
SUBDIRS += Default_Deriv1
50
# Most subdirectories include code that requires some "integrals"
51
# library, like the notorious libint, which is always included.
52
# Here we test SUBDIRS for presence of such
53
# and form the list of the libraries. Remember that libderiv and libr12
54
# depend on libint, and hence need to come first for GNU ld to work.
57
ifeq ($(findstring MP2R12,$(SUBDIRS)),MP2R12)
58
ifneq ($(findstring -lPSI_r12,$(INTLIBS)),-lPSI_r12)
59
INTLIBS := -lPSI_r12 $(INTLIBS)
62
ifeq ($(findstring R12_Ints,$(SUBDIRS)),R12_Ints)
63
ifneq ($(findstring -lPSI_r12,$(INTLIBS)),-lPSI_r12)
64
INTLIBS := -lPSI_r12 $(INTLIBS)
67
ifeq ($(findstring Default_Deriv1,$(SUBDIRS)),Default_Deriv1)
68
ifneq ($(findstring -lPSI_deriv,$(INTLIBS)),-lPSI_deriv)
69
INTLIBS := -lPSI_deriv $(INTLIBS)
72
ifeq ($(findstring Default_Deriv2,$(SUBDIRS)),Default_Deriv2)
73
ifneq ($(findstring -lderiv,$(INTLIBS)),-lPSI_deriv)
74
INTLIBS := -lPSI_deriv $(INTLIBS)
79
# These preprocessor defines will tell main.c and parsing.c what
80
# sections of code to include
82
OPTIONS = $(SUBDIRS:%=-DINCLUDE_%)
85
# Tools will always be included
87
DIRS = Tools $(SUBDIRS)
91
VPATH += $(DIRS:%=$(srcdir)/%)
95
CFLAGS = $(CDBG) $(COPT) $(CDEF) $(COTH) $(CINC)
96
CINC += -I$(srcdir) $(DIRS:%=-I$(srcdir)/%)
99
CXXFLAGS = $(CXXDBG) $(CXXOPT) $(CXXDEF) $(CXXOTH) $(CXXINC)
100
CXXINC += -I$(srcdir) $(DIRS:%=-I$(srcdir)/%)
103
LDLIBS += $(BLAS) -lpthread
104
PSILIBS = -lPSI_qt -lPSI_chkpt $(INTLIBS) -lPSI_iwl \
105
-lPSI_psio -lPSI_ciomr -lPSI_ipv1
106
ifeq ($(findstring CC,$(SUBDIRS)),CC)
107
ifneq ($(findstring -lPSI_dpd,$(PSILIBS)),-lPSI_dpd)
108
PSILIBS := -lPSI_dpd $(PSILIBS)
112
CXXSRC = $(DIRS:%=%/*.cc) *.cc
113
TRUECXXSRC = $(notdir $(shell echo `ls $(CXXSRC:%=$(srcdir)/%)`))
115
BINOBJ = $(TRUECXXSRC:%.cc=%.o)
119
# DEC/Compaq Alpha systems apparently require this for threaded code
120
ifneq (,$(findstring osf, $(target)))
126
install:: install_html
128
install_man:: cints.1
129
$(MKDIRS) $(DESTDIR)$(mandir)/man1
130
$(INSTALL_INCLUDE) $^ $(DESTDIR)$(mandir)/man1
132
install_html:: install_index install_htmlsrc
134
install_index:: cints.html
135
$(MKDIRS) $(DESTDIR)$(htmldir)
136
$(INSTALL_INCLUDE) $^ $(DESTDIR)$(htmldir)
138
HTMLSRC = $(shell echo `ls $(srcdir)/Documentation/*.html`)
139
install_htmlsrc: $(HTMLSRC)
140
$(MKDIRS) $(DESTDIR)$(htmldir)/CINTS
141
$(INSTALL_INCLUDE) $(HTMLSRC) $(DESTDIR)$(htmldir)/CINTS
143
ifneq ($(DODEPEND),no)
144
$(BINOBJ:%.o=%.d): $(DEPENDINCLUDE)
145
include $(BINOBJ:%.o=%.d)