-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathMakefile.header
More file actions
57 lines (48 loc) · 1.36 KB
/
Copy pathMakefile.header
File metadata and controls
57 lines (48 loc) · 1.36 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
# Do this before Makefile.header so we can annotate dynlib with COMMS
# COMMS undefined for serial case
ifdef COMMS
COMMS := $(strip $(COMMS))
endif
POSTDIR = postw90/
ifeq ($(COMMS),mpi08)
USEMPI=y
TEMP1 = -DMPI -DMPI08
TEMP2 = $(MPIF90)
else ifeq ($(COMMS),mpih)
USEMPI=y
TEMP1 = -DMPI -DMPIH
TEMP2 = $(MPIF90)
else ifeq ($(COMMS),mpi90)
USEMPI=y
TEMP1 = -DMPI -DMPI90
TEMP2 = $(MPIF90)
else ifeq ($(COMMS),mpi)
USEMPI=y
# default to f90 style "use mpi"
TEMP1 = -DMPI -DMPI90
TEMP2 = $(MPIF90)
else
TEMP1 =
TEMP2 = $(F90)
endif
POSTOPTS = $(TEMP1)
COMPILER = $(TEMP2)
## Dynamic library section
## Define some defaults (good for linux) if none is defined in the make.inc
## Different flags are needed depending on the compiler and on the OS
## (e.g. on Mac, it's -dynamiclib and the extension if .dylib - even if
## calling it .so and using -shared often works equally well)
## NOTE: if you want to compile the dynamic library, you have to compile
## everything with -fPIC usually, on 64bit systems
SHAREDLIBFLAGS ?=-shared -Wl,-soname,libwannier90.so.4 -fPIC
## Define the filename
ifdef USEMPI
LIBSUFFIX=_mpi
LIBDESCRIPTION = Compute maximally-localised Wannier functions (MPI version)
else
LIBSUFFIX=
LIBDESCRIPTION = Compute maximally-localised Wannier functions
endif
DYNLIBBASE = wannier90$(LIBSUFFIX)
STATICLIBRARY = lib$(DYNLIBBASE).a
DYNLIBRARY = lib$(DYNLIBBASE).so.4