Makefile.am 7.62 KB
Newer Older
1
## Process this file with automake to produce Makefile.in
2

3
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
4

5
6
AM_FCFLAGS = $(SCALAPACK_FCFLAGS) @FC_MODINC@modules @FC_MODOUT@modules
AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
7
8

# libelpa
9
10
lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
11

12
libelpa@SUFFIX@_la_SOURCES = src/elpa1.F90 src/elpa2.F90
13

Andreas Marek's avatar
Andreas Marek committed
14
if WITH_REAL_GENERIC_KERNEL
15
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
16
17
endif

Andreas Marek's avatar
Andreas Marek committed
18
if WITH_COMPLEX_GENERIC_KERNEL
19
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
20
21
endif

Andreas Marek's avatar
Andreas Marek committed
22
if WITH_REAL_GENERIC_SIMPLE_KERNEL
23
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
24
25
endif

Andreas Marek's avatar
Andreas Marek committed
26
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
27
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
28
29
endif

Andreas Marek's avatar
Andreas Marek committed
30
if WITH_REAL_BGP_KERNEL
31
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
32
33
endif

Andreas Marek's avatar
Andreas Marek committed
34
if WITH_REAL_BGQ_KERNEL
35
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
36
37
endif

Andreas Marek's avatar
Andreas Marek committed
38
if WITH_REAL_SSE_KERNEL
39
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
40
41
else
if WITH_COMPLEX_SSE_KERNEL
42
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
43
44
endif
endif
Andreas Marek's avatar
Andreas Marek committed
45
46

if WITH_REAL_AVX_BLOCK2_KERNEL
47
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
48
49
endif

Andreas Marek's avatar
Andreas Marek committed
50
if WITH_REAL_AVX_BLOCK4_KERNEL
51
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
52
53
endif

Andreas Marek's avatar
Andreas Marek committed
54
if WITH_REAL_AVX_BLOCK6_KERNEL
55
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
56
57
endif

Andreas Marek's avatar
Andreas Marek committed
58
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
59
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
60
61
endif

Andreas Marek's avatar
Andreas Marek committed
62
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
63
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
64
65
endif

Andreas Marek's avatar
Andreas Marek committed
66
#if WITH_AVX_SANDYBRIDGE
67
#  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
68
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
69
70
#endif

71
# install any .mod files in the include/ dir
72
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
73
74
75
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
76
filesdir = $(docdir)/examples
77
dist_files_DATA = \
78
79
80
81
82
83
84
85
86
87
88
89
90
  test/read_real.F90 \
  test/read_real_gen.F90 \
  test/test_complex2.F90 \
  test/test_complex2_default_kernel.F90 \
  test/test_complex2_choose_kernel_with_api.F90 \
  test/test_complex.F90 \
  test/test_complex_gen.F90 \
  test/test_real2.F90 \
  test/test_real2_default_kernel.F90 \
  test/test_real2_choose_kernel_with_api.F90 \
  src/print_available_elpa2_kernels.F90 \
  test/test_real.F90 \
  test/test_real_gen.F90
91

92
93
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

94
95
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
96
pkgconfig_DATA = @PKG_CONFIG_FILE@
97

98
99
# programs
bin_PROGRAMS = \
100
101
102
103
104
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
105
106

noinst_PROGRAMS = \
107
108
109
110
  elpa2_test_real_default_kernel@SUFFIX@ \
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@
111

112
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
113

114
elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90 test/util.F90
115
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
116

117
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90 test/util.F90
118
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
119

120
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90 test/util.F90
121
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
122

123
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90 test/util.F90
124
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
125

126
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90 test/util.F90
127
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
128

129
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90 test/util.F90
130
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
131

132
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90 test/util.F90
133
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
134

135
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90 test/util.F90
136
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
137

138
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 test/util.F90
139
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
140

141
check_SCRIPTS = \
142
143
144
145
146
147
148
149
150
  elpa1_test_real.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
151
152
153

TESTS = $(check_SCRIPTS)

154
elpa1_test_real.sh:
155
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
156
	chmod +x elpa1_test_real.sh
157

158
elpa2_test_real.sh:
159
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
160
	chmod +x elpa2_test_real.sh
161

162
elpa2_test_real_default_kernel.sh:
163
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
164
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
165

166
elpa2_test_real_choose_kernel_with_api.sh:
167
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
168
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
169

170
elpa1_test_complex.sh:
171
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
172
	chmod +x elpa1_test_complex.sh
173

174
elpa2_test_complex.sh:
175
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
176
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
177

178
elpa2_test_complex_default_kernel.sh:
179
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
180
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
181

182
elpa2_test_complex_choose_kernel_with_api.sh:
183
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
184
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
185
186
187

elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
188

Andreas Marek's avatar
Andreas Marek committed
189
190
elpa1.i: $(top_srcdir)/src/elpa1.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa1.F90 -o $@
191

192
CLEANFILES = \
193
194
195
196
197
198
199
200
201
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  *.i
202
203

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
204
205
206
207
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
208
209
210
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
211
	-rmdir ./src/elpa2_kernels/
212
213
	-rmdir ./src
	-rmdir ./test
214
	-rmdir ./m4
215
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
216
	-rmdir .fortran_dependencies/
217
218

EXTRA_DIST = fdep/fortran_dependencies.pl fdep/fortran_dependencies.mk
219

220
221
222
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
223

224

225
@FORTRAN_MODULE_DEPS@
226
227
228
229
230

# Fortran module dependencies only work within each target,
# specify that the test programs need a finished library before
# one can compile them

231
# $1  Object name
232
define require_elpa_lib
233
$1: libelpa@SUFFIX@.la
234
235

endef
236
$(foreach p,$(bin_PROGRAMS) $(noinst_PROGRAMS),$(foreach o,$($p_OBJECTS),$(eval $(call require_elpa_lib,$o))))