-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
106 lines (86 loc) · 3.15 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
#####################
#
# Author: Murilo Tiago, Univ. of Minnesota (2004)
# mtiago@msi.umn.edu
#
# Copyright (C) 2009 Murilo L. Tiago, http://users.ices.utexas.edu/~mtiago
# This file is part of RGWBS. It is distributed under the GPL v1.
#
#####################
# Make sure the MACH paramter reflects the correct platform.
# Existing parameter files for different platforms are found under
# subdirectory ./config
#####################
#MACH = cori.serial
#MACH = ices
#MACH = edison
MACH = stampede2.2018
# Version date: must have exactly 28 characters!
VERSIONDATE = "Fri Jan 2 17:07:49 EST 2009"
#####################
# Typically, no changes are needed beyond this point
#####################
MACH_CONF = ./config/make.$(MACH).h
include $(MACH_CONF)
default:
@echo
@echo "Using compilation parameters for machine $(MACH)"
@echo " if this is not your machine, edit ./Makefile file"
@echo
@echo " Pre-compilation options: $(CPPOPT)"
@echo " executable extension: $(EXT)"
@echo
@echo " COMPILATION OPTIONS:"
@echo " make tdlda - code for calculation of TDLDA excited states"
@echo " make sigma - code for self-energy in GW approximation"
@echo " make bsesolv - code for solution of Bethe-Salpeter equation"
@echo " make w_blip - code for BLIP interpolation"
@echo " make util - compile pre-processing and post-processing tools"
@echo " make all - tdlda+sigma+bsesolv+w_blip+util"
@echo " make clean - delete all generated files"
@echo " make allclean - also delete binaries and backup files"
@echo
@echo " Note: after failure, use make clean to create a clean slate."
@echo
DEPTH = .
UTILS = absp chkpt_bin_asc proj_pol rotate_pol
#
all: tdlda sigma bsesolv w_blip util
tdlda: create_tmp
@ cd tmp_$(MACH) ; \
/bin/rm -f mach_tmp ; echo "MACH = " $(MACH) > mach_tmp ; \
echo "VERSIONDATE = " $(VERSIONDATE) >> mach_tmp ; \
/bin/rm -f Makefile ; cat ../$(MACH_CONF) mach_tmp \
../TDLDA/Makefile > makefile ; $(MAKE) -f makefile
sigma: create_tmp
@ cd tmp_$(MACH) ; \
/bin/rm -f mach_tmp ; echo "MACH = " $(MACH) > mach_tmp ; \
echo "VERSIONDATE = " $(VERSIONDATE) >> mach_tmp ; \
/bin/rm -f Makefile ; cat ../$(MACH_CONF) mach_tmp \
../SIGMA/Makefile > makefile ; $(MAKE) -f makefile
bsesolv: create_tmp
@ cd tmp_$(MACH) ; \
/bin/rm -f mach_tmp ; echo "MACH = " $(MACH) > mach_tmp ; \
echo "VERSIONDATE = " $(VERSIONDATE) >> mach_tmp ; \
/bin/rm -f Makefile ; cat ../$(MACH_CONF) mach_tmp \
../BSE/Makefile > makefile ; $(MAKE) -f makefile
w_blip: create_tmp
@ cd tmp_$(MACH) ; \
/bin/rm -f mach_tmp ; echo "MACH = " $(MACH) > mach_tmp ; \
echo "VERSIONDATE = " $(VERSIONDATE) >> mach_tmp ; \
/bin/rm -f Makefile ; cat ../$(MACH_CONF) mach_tmp \
../W_BLIP/Makefile > makefile ; $(MAKE) -f makefile
util: $(UTILS)
$(UTILS): create_tmp
@ cd tmp_$(MACH) ; /bin/rm -f Makefile ; \
cat ../$(MACH_CONF) ../utils/Makefile > \
makefile ; $(MAKE) -f makefile -e $@
create_tmp:
@if [ ! -d tmp_$(MACH) ] ; then mkdir tmp_$(MACH) ; fi
@if [ ! -d bin ] ; then mkdir bin ; fi
clean:
@/bin/rm -fR tmp_*
allclean: clean
/bin/rm -f bin/* SIGMA/*~ BSE/*~ TDLDA/*~ W_BLIP/*~ \
shared/*~ utils/*~ config/*~
cleanall: allclean