forked from mpickpt/mana
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.in
More file actions
161 lines (138 loc) · 4.63 KB
/
Makefile.in
File metadata and controls
161 lines (138 loc) · 4.63 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
@SET_MAKE@
LN_S=@LN_S@ -f
MKDIR_P=@MKDIR_P@
CC=@CC@
CFLAGS = @CFLAGS@
CXX=@CXX@
CXXFLAGS = @CXXFLAGS@
CPP=@CPP@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
PACKAGE=@PACKAGE_TARNAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@-@PACKAGE_VERSION@
VERSION=@PACKAGE_VERSION@
# Allow the user to specify the install program.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
bindir=@bindir@
libdir=@libdir@
pkglibdir = @libdir@/@PACKAGE@
docdir=@docdir@
includedir=@includedir@
mandir=@mandir@
infodir=@mandir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
targetdir = $(top_builddir)
INSTALL_FLAGS = install
UNINSTALL_FLAGS = uninstall
# Macros TEST and XTERM_E used on command line by check1, check2, ...:
# make TEST=readline XTERM_E="xterm -e" check-readline
default: display-build-env add-git-hooks mana_prereqs
$(MAKE) mana
all: default
mana: mana_prereqs dmtcp
cd mpi-proxy-split && $(MAKE) install && $(MAKE) -j tests
dmtcp:
cd dmtcp && $(MAKE)
cp -rf dmtcp/bin .
cp -rf dmtcp/lib .
create-dirs:
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -d $(DESTDIR)$(libdir)
$(INSTALL) -d $(DESTDIR)$(pkglibdir)
$(INSTALL) -d $(DESTDIR)$(includedir)
$(INSTALL) -d $(DESTDIR)$(docdir)
$(INSTALL) -d $(DESTDIR)$(mandir)/man1
install: all create-dirs
cd dmtcp && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS)
cd mpi-proxy-split && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS)
cd manpages && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS)
uninstall:
cd dmtcp && make DESTDIR=$(DESTDIR) $(UNINSTALL_FLAGS)
cd mpi-proxy-split && make DESTDIR=$(DESTDIR) $(UNINSTALL_FLAGS)
cd manpages && make DESTDIR=$(DESTDIR) $(UNINSTALL_FLAGS)
distclean: clean
- cd dmtcp && $(MAKE) distclean
- cd mpi-proxy-split && $(MAKE) distclean
- cd manpages && $(MAKE) distclean
rm -f Makefile config.log config.status config.status-* config.cache
rm -rf autom4te.cache
rm -rf $(top_builddir)/lib
- cd $(top_builddir)/bin && find . \! -name '*mana*' -delete
tidy:
rm -rf ckpt_rank*
rm -f ckpt_*.dmtcp dmtcp_restart_script*
clean: tidy
- cd dmtcp && $(MAKE) clean
- cd mpi-proxy-split && $(MAKE) clean
mana_prereqs:
@ if test -n "$$HUGETLB_DEFAULT_PAGE_SIZE"; then \
echo '** Env. var. HUGETLB_DEFAULT_PAGE_SIZE detected.'; \
echo '** Currently, DMTCP can support targets that use HUGEPAGES.';\
echo '** But DMTCP itself must be built without HUGEPAGES.'; \
echo '** Please temporarily do: "module unload *hugepages*"'; \
exit 1; \
fi
@ # The darshan module is used at NERSC.
@ if command -v module >/dev/null && module list 2>&1| grep -q darshan;\
then \
echo '** DMTCP is incompatible with the darshan module.'; \
echo '** Please do "module unload darshan" before building DMTCP.';\
exit 1; \
fi
@ # The altd module is used at NERSC.
@ if command -v module >/dev/null && module list 2>&1| grep -q altd;\
then \
echo '** DMTCP is incompatible with the altd module.'; \
echo '** Please do "module unload altd" before building DMTCP.';\
exit 1; \
fi
@ # If one is building MANA on a compute node.
@ if test -n "$$SLURM_NODEID"; then \
echo '** Warning: Building MANA can take longer on a compute node.'; \
echo '** Please build MANA on a login node.'; \
fi
display-build-env: display-config display-release
@- uname -a
@ echo -n "libc version: " && ldd --version | head -1 || true
@- echo 'Compiler: ${CC}'
@- ${CC} -v 2>&1
@- echo 'CFLAGS: ${CFLAGS}'
@- echo 'CXXFLAGS: ${CXXFLAGS}'
@- echo 'CPPFLAGS: ${CPPFLAGS}'
@- echo 'LDFLAGS: ${LDFLAGS}'
@ echo ""
display-release:
@ lsb_release -dc 2> /dev/null || \
grep -i SUSE /etc/SuSE-release 2> /dev/null || \
cat /etc/redhat-release 2> /dev/null || true
@ cat /etc/debian-version 2> /dev/null && echo ' (Debian)' || true
@ cat /etc/rocks-release 2> /dev/null || true
display-config:
@- echo DMTCP version: ${VERSION}
@- echo Date built: \ \ `date`
@- if test -r ./config.log ; then \
echo -n 'config.log: ' ; \
grep '\$$ .*configure ' config.log | sed -e 's^\$$^^'; \
fi
_hooksdir=.git/hooks
add-git-hooks: ${_hooksdir}/pre-commit ${_hooksdir}/post-rewrite
${_hooksdir}/%: util/hooks/%
if test -d ${_hooksdir}; then \
cd ${_hooksdir} && ln -s ../../$< . ; \
fi
# src/Makefile tries to make this, to ensure that configure, config.status,
# and so on are up to date. It's assuming that this directory is also
# under control of automake. So, we add this stub to satisfy automake.
am--refresh:
.PHONY: default all add-git-hooks \
display-build-env display-release display-config \
dmtcp clean