-
Notifications
You must be signed in to change notification settings - Fork 98
/
Makefile
131 lines (104 loc) · 2.96 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
TOPDIR=.
ifndef SRCDIR
SRCDIR=$(shell pwd)
endif
-include $(TOPDIR)/Makedirlist
-include $(TOPDIR)/src/lib/MakeVars
SUBDIRS = src
CHECKSUBDIRS = tests/eri tests/unit tests/hartree-fock
CLEANSUBDIRS = $(SUBDIRS) $(CHECKSUBDIRS)
ALLSUBDIRS = $(CLEANSUBDIRS) doc $(CHECKSUBDIRS)
default::
for dir in $(SUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(JOBS)) || exit 1; \
done
all:: default
ifndef DODEPEND
DODEPENDOPT = "DODEPEND=no"
endif
export::
for dir in $(SUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) export) || exit 1; \
done
(cd export && $(MAKE) $(DODEPENDOPT) export) || exit 1;
install:: all install_pkgconfig install_inc install_data
for dir in $(SUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) install) || exit 1; \
done
ifdef pkgconfigdir
install_pkgconfig::
$(INSTALL) $(INSTALLDIROPT) $(DESTDIR)$(pkgconfigdir)
$(INSTALL) $(INSTALLLIBOPT) $(TOPDIR)/libint2.pc $(DESTDIR)$(pkgconfigdir)
endif
install_data::
$(INSTALL) $(INSTALLDIROPT) $(DESTDIR)$(datadir)/basis
$(INSTALL) $(INSTALLLIBOPT) $(SRCTOPDIR)/lib/basis/* $(DESTDIR)$(datadir)/basis
install_inc:: all
for dir in $(SUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) install_inc) || exit 1; \
done
install_target:: all
for dir in $(SUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) install_target) || exit 1; \
done
uninstall::
for dir in $(SUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) uninstall) || exit 1; \
done
clean::
for dir in $(CLEANSUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) clean) || exit 1; \
done
oclean::
for dir in $(CLEANSUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) oclean) || exit 1; \
done
distclean::
for dir in $(ALLSUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) distclean) || exit 1; \
done
-rm -rf autom4te.cache config.status config.log conf*.file conf*.dir *.dSYM depcheck* libtool \
Makedirlist libint2.pc include/libint2
test -f libint2.pc.in || rm -rf include/libint2
targetclean::
for dir in $(SUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) targetclean) || exit 1; \
done
realclean::
for dir in $(CLEANSUBDIRS); \
do \
(cd $${dir} && $(MAKE) $(DODEPENDOPT) realclean) || exit 1; \
done
check::
for dir in $(CHECKSUBDIRS); \
do \
(cd $${dir} && $(MAKE) check) || exit 1; \
done
install-pdf:: pdf
(cd doc && $(MAKE) $(DODEPENDOPT) install-pdf) || exit 1;
install-ps:: ps
(cd doc && $(MAKE) $(DODEPENDOPT) install-ps) || exit 1;
install-dvi:: dvi
(cd doc && $(MAKE) $(DODEPENDOPT) install-dvi) || exit 1;
install-html:: html
(cd doc && $(MAKE) $(DODEPENDOPT) install-html) || exit 1;
pdf::
(cd doc && $(MAKE) $(DODEPENDOPT) pdf) || exit 1;
ps::
(cd doc && $(MAKE) $(DODEPENDOPT) ps) || exit 1;
dvi::
(cd doc && $(MAKE) $(DODEPENDOPT) dvi) || exit 1;
html::
(cd doc && $(MAKE) $(DODEPENDOPT) html) || exit 1;
doc::
(cd doc && $(MAKE) $(DODEPENDOPT) install-pdf install-html) || exit 1;