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

3
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
4

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

# libelpa

10
11
# parts with public interface
noinst_LTLIBRARIES = libelpa@SUFFIX@_public.la
12
libelpa@SUFFIX@_public_la_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@modules @FC_MODINC@private_modules
13
14
15
libelpa@SUFFIX@_public_la_SOURCES = \
        src/elpa1.F90 \
        src/elpa2.F90 \
16
	src/elpa1_auxiliary.F90 \
17
18
19
20
21
        src/elpa2_utilities.F90 \
        src/elpa_utilities.F90

# internal parts
noinst_LTLIBRARIES += libelpa@SUFFIX@_private.la
22
libelpa@SUFFIX@_private_la_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
23
libelpa@SUFFIX@_private_la_SOURCES = \
24
25
26
27
28
29
30
31
        src/mod_precision.f90 \
        src/mod_mpi.F90 \
        src/mod_mpi_stubs.F90 \
        src/mod_pack_unpack_real.F90 \
        src/mod_compute_hh_trafo_real.F90 \
        src/mod_compute_hh_trafo_complex.F90 \
        src/mod_pack_unpack_complex.F90 \
        src/aligned_mem.F90 \
32
        src/elpa1_compute_private.F90 \
33
        src/elpa2_compute.F90 \
34
35
        src/elpa2_kernels/mod_fortran_interfaces.F90 \
        src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
36
37
38
39
40
41
        src/elpa_c_interface.F90 \
        src/elpa_qr/qr_utils.F90 \
        src/elpa_qr/elpa_qrkernels.f90 \
        src/elpa_qr/elpa_pdlarfb.F90 \
        src/elpa_qr/elpa_pdgeqrf.F90

42
EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
43
44
45
        src/elpa_reduce_add_vectors.X90 \
        src/elpa_transpose_vectors.X90 \
        src/redist_band.X90
46

47
48
49
50
51
52
lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
libelpa@SUFFIX@_la_LIBADD = libelpa@SUFFIX@_public.la libelpa@SUFFIX@_private.la
libelpa@SUFFIX@_la_SOURCES =


53
if HAVE_DETAILED_TIMINGS
54
  libelpa@SUFFIX@_private_la_SOURCES += \
55
56
57
58
59
60
61
62
63
        src/timer.F90 \
        src/ftimings/ftimings.F90 \
        src/ftimings/ftimings_type.F90 \
        src/ftimings/ftimings_value.F90 \
        src/ftimings/highwater_mark.c \
        src/ftimings/resident_set_size.c \
        src/ftimings/time.c \
        src/ftimings/virtual_memory.c \
        src/ftimings/papi.c
64
65
endif

66
if !WITH_MPI
67
  libelpa@SUFFIX@_private_la_SOURCES += src/mod_time_c.F90
68
if !HAVE_DETAILED_TIMINGS
69
  libelpa@SUFFIX@_private_la_SOURCES += src/ftimings/time.c
70
71
72
endif
endif

Andreas Marek's avatar
Andreas Marek committed
73
if WITH_REAL_GENERIC_KERNEL
74
  libelpa@SUFFIX@_private_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.F90
75
76
endif

Andreas Marek's avatar
Andreas Marek committed
77
if WITH_COMPLEX_GENERIC_KERNEL
78
  libelpa@SUFFIX@_private_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.F90
79
80
endif

Andreas Marek's avatar
Andreas Marek committed
81
if WITH_REAL_GENERIC_SIMPLE_KERNEL
82
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.F90
83
84
endif

Andreas Marek's avatar
Andreas Marek committed
85
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
86
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.F90
87
88
endif

Andreas Marek's avatar
Andreas Marek committed
89
if WITH_REAL_BGP_KERNEL
90
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
91
92
endif

Andreas Marek's avatar
Andreas Marek committed
93
if WITH_REAL_BGQ_KERNEL
94
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
95
96
endif

97
if WITH_REAL_SSE_ASSEMBLY_KERNEL
98
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
99
else
100
if WITH_COMPLEX_SSE_ASSEMBLY_KERNEL
101
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
102
103
endif
endif
Andreas Marek's avatar
Andreas Marek committed
104

105
if WITH_REAL_SSE_BLOCK2_KERNEL
106
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_2hv.c
107
108
endif

Andreas Marek's avatar
Andreas Marek committed
109
if WITH_REAL_AVX_BLOCK2_KERNEL
110
111
112
113
114
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_2hv.c
else
if WITH_REAL_AVX2_BLOCK2_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_2hv.c
endif
115
116
endif

117
if WITH_REAL_SSE_BLOCK4_KERNEL
118
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_4hv.c
119
120
endif

Andreas Marek's avatar
Andreas Marek committed
121
if WITH_REAL_AVX_BLOCK4_KERNEL
122
123
124
125
126
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_4hv.c
else
if WITH_REAL_AVX2_BLOCK4_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_4hv.c
endif
127
128
endif

129
if WITH_REAL_SSE_BLOCK6_KERNEL
130
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_6hv.c
131
132
endif

Andreas Marek's avatar
Andreas Marek committed
133
if WITH_REAL_AVX_BLOCK6_KERNEL
134
135
136
137
138
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_6hv.c
else
if WITH_REAL_AVX2_BLOCK6_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_6hv.c
endif
139
140
endif

141
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
142
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_1hv.c
143
144
endif

Andreas Marek's avatar
Andreas Marek committed
145
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
146
147
148
149
150
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_1hv.c
else
if WITH_COMPLEX_AVX2_BLOCK1_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_1hv.c
endif
151
152
endif

153
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
154
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_2hv.c
155
156
endif

Andreas Marek's avatar
Andreas Marek committed
157
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
158
159
160
161
162
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_2hv.c
else
if WITH_COMPLEX_AVX2_BLOCK2_KERNEL
  libelpa@SUFFIX@_private_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_2hv.c
endif
163
164
endif

165
166
167
include generated_headers.am
BUILT_SOURCES = $(generated_headers)

168
# install public Fortran modules files in the include/ dir
169
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
170
nobase_elpa_include_HEADERS = $(wildcard modules/*)
Andreas Marek's avatar
Andreas Marek committed
171
nobase_elpa_include_HEADERS += elpa/elpa.h elpa/elpa_kernel_constants.h elpa/elpa_generated.h
172

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
173
174
dist_man_MANS = \
	   man/solve_evp_real.3 \
175
	   man/solve_evp_real_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
176
	   man/solve_evp_complex.3 \
177
	   man/solve_evp_complex_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
178
179
180
	   man/solve_evp_real_2stage.3 \
	   man/solve_evp_complex_2stage.3 \
	   man/get_elpa_row_col_comms.3 \
181
	   man/get_elpa_communicators.3 \
182
	   man/elpa2_print_kernels.1
Andreas Marek's avatar
Andreas Marek committed
183

184
# other files to distribute
185
filesdir = $(docdir)/examples
186
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
187
188
189
190
191
192
193
194
195
196
197
  test/fortran_test_programs/read_real.F90 \
  test/fortran_test_programs/test_complex2.F90 \
  test/fortran_test_programs/test_complex2_default_kernel.F90 \
  test/fortran_test_programs/test_complex2_choose_kernel_with_api.F90 \
  test/fortran_test_programs/test_complex.F90 \
  test/fortran_test_programs/test_real2.F90 \
  test/fortran_test_programs/test_real2_default_kernel.F90 \
  test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 \
  test/fortran_test_programs/test_real2_choose_kernel_with_api.F90 \
  test/fortran_test_programs/test_real.F90 \
  test/fortran_test_programs/test_real_with_c.F90 \
198
  src/elpa2_print_kernels.F90
199

200
dist_doc_DATA = README.md USERS_GUIDE.md INSTALL.md CONTRIBUTING.md LICENSE Changelog COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
201

202
203
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
204
pkgconfig_DATA = @PKG_CONFIG_FILE@
205

206
207
# programs
bin_PROGRAMS = \
208
209
210
  elpa2_print_kernels@SUFFIX@

noinst_PROGRAMS = \
211
212
213
214
215
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_test_real_default_kernel@SUFFIX@ \
216
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
217
218
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
219
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
220
221
222
  elpa1_test_real_with_c@SUFFIX@
if !WITH_OPENMP
noinst_PROGRAMS += \
223
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
224
225
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
226
227
  elpa2_test_complex_c_version@SUFFIX@
endif
228

229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
build_lib = libelpa@SUFFIX@.la libelpatest@SUFFIX@.la

# library with shared sources for the test files
noinst_LTLIBRARIES += libelpatest@SUFFIX@.la
libelpatest@SUFFIX@_la_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
libelpatest@SUFFIX@_la_SOURCES = \
	test/shared_sources/util.F90 \
	test/shared_sources/read_input_parameters.F90  \
	test/shared_sources/check_correctnes.F90 \
	test/shared_sources/setup_mpi.F90 \
	test/shared_sources/blacs_infrastructure.F90 \
	test/shared_sources/prepare_matrix.F90 \
	test/shared_sources/mod_output_types.F90 \
	test/shared_sources/mod_from_c.F90 \
	test/shared_sources/call_elpa1.c
Andreas Marek's avatar
Andreas Marek committed
244

245
if HAVE_REDIRECT
246
247
248
libelpatest@SUFFIX@_la_SOURCES += \
	test/shared_sources/redir.c \
	test/shared_sources/redirect.F90
249
250
endif

251
if !WITH_OPENMP
252
elpa1_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_real_c_version.c
Andreas Marek's avatar
Andreas Marek committed
253
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
254
elpa1_test_real_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
255
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
256
EXTRA_elpa1_test_real_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
257

258
elpa1_test_complex_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_complex_c_version.c
Andreas Marek's avatar
Andreas Marek committed
259
elpa1_test_complex_c_version@SUFFIX@_LDADD = $(build_lib)
260
elpa1_test_complex_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
Andreas Marek's avatar
Andreas Marek committed
261
elpa1_test_complex_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
262
EXTRA_elpa1_test_complex_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
263

264
elpa2_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa2_test_real_c_version.c
Andreas Marek's avatar
Andreas Marek committed
265
elpa2_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
266
elpa2_test_real_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
Andreas Marek's avatar
Andreas Marek committed
267
elpa2_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
268
EXTRA_elpa2_test_real_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
269

270
elpa2_test_complex_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa2_test_complex_c_version.c
Andreas Marek's avatar
Andreas Marek committed
271
elpa2_test_complex_c_version@SUFFIX@_LDADD = $(build_lib)
272
elpa2_test_complex_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
Andreas Marek's avatar
Andreas Marek committed
273
elpa2_test_complex_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
274
EXTRA_elpa2_test_complex_c_version@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
275
endif
Andreas Marek's avatar
Andreas Marek committed
276

277
elpa1_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real.F90
278
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
279
elpa1_test_real@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
Lorenz Huedepohl's avatar
Typo  
Lorenz Huedepohl committed
280
EXTRA_elpa1_test_real@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
281

282
elpa1_test_real_with_c@SUFFIX@_SOURCES = test/fortran_test_programs/test_real_with_c.F90
Andreas Marek's avatar
Andreas Marek committed
283
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)
284
elpa1_test_real_with_c@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
285
EXTRA_elpa1_test_real_with_c@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
286

287
elpa2_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2.F90
288
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
289
elpa2_test_real@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
290
EXTRA_elpa2_test_real@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
291

292
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel.F90
293
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
294
elpa2_test_real_default_kernel@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
295
EXTRA_elpa2_test_real_default_kernel@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
296

297

298
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90
299
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)
300
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
301
EXTRA_elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
302

303
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_choose_kernel_with_api.F90
304
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
305
elpa2_test_real_choose_kernel_with_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
306
EXTRA_elpa2_test_real_choose_kernel_with_api@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
307

308
elpa1_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex.F90
309
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
310
elpa1_test_complex@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
311
EXTRA_elpa1_test_complex@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
312

313

314
elpa2_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2.F90
315
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
316
elpa2_test_complex@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
317
EXTRA_elpa2_test_complex@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
318

319
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_default_kernel.F90
320
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
321
elpa2_test_complex_default_kernel@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
322
EXTRA_elpa2_test_complex_default_kernel@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
323

324
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_choose_kernel_with_api.F90
325
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
326
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
327
EXTRA_elpa2_test_complex_choose_kernel_with_api@SUFFIX@_DEPENDENCIES = test/fortran_test_programs/elpa_test_programs_print_headers.X90
Andreas Marek's avatar
Andreas Marek committed
328

329
elpa2_print_kernels@SUFFIX@_SOURCES = src/elpa2_print_kernels.F90
330
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
331
elpa2_print_kernels@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
Andreas Marek's avatar
Andreas Marek committed
332

Andreas Marek's avatar
Andreas Marek committed
333
334
335
#  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@.sh


336
check_SCRIPTS = \
337
338
339
340
341
342
343
344
345
  elpa1_test_real@SUFFIX@.sh \
  elpa1_test_real_with_c@SUFFIX@.sh \
  elpa2_test_real@SUFFIX@.sh \
  elpa2_test_real_default_kernel@SUFFIX@.sh \
  elpa1_test_complex@SUFFIX@.sh \
  elpa2_test_complex@SUFFIX@.sh \
  elpa2_test_complex_default_kernel@SUFFIX@.sh \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@.sh \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@.sh \
346
  elpa2_print_kernels@SUFFIX@
347

Andreas Marek's avatar
Andreas Marek committed
348

349
350
if !WITH_OPENMP
check_SCRIPTS += \
351
352
353
354
  elpa1_test_real_c_version@SUFFIX@.sh \
  elpa1_test_complex_c_version@SUFFIX@.sh \
  elpa2_test_real_c_version@SUFFIX@.sh \
  elpa2_test_complex_c_version@SUFFIX@.sh
355
endif
356

Andreas Marek's avatar
Andreas Marek committed
357

358
# test scripts
359
MPIEXEC ?= mpiexec -n 2
360
if WITH_MPI
361
  wrapper=$(MPIEXEC)
362
else
363
  wrapper=
364
365
366
endif
TESTS = $(check_SCRIPTS)
%.sh: %
367
	echo '$(wrapper) ./$^ $$TEST_FLAGS' > $@
368
	chmod +x $@
Andreas Marek's avatar
Andreas Marek committed
369

370
# Preprocessed files (just used for manual inspection)
Andreas Marek's avatar
Andreas Marek committed
371
372
373
elpa2_utilities.i: $(top_srcdir)/src/elpa2_utilities.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2_utilities.F90 -o $@

Andreas Marek's avatar
Andreas Marek committed
374
375
elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
376

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

380
381
382
elpa2_kernels_real.i: $(top_srcdir)/src/elpa2_kernels/elpa2_kernels_real.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2_kernels/elpa2_kernels_real.F90 -o $@

383
384
385
mod_compute_hh_trafo_real.i: $(top_srcdir)/src/mod_compute_hh_trafo_real.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/mod_compute_hh_trafo_real.F90 -o $@

386
387
388
389
mod_compute_hh_trafo_complex.i: $(top_srcdir)/src/mod_compute_hh_trafo_complex.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/mod_compute_hh_trafo_complex.F90 -o $@


390
391
include doxygen.am

392
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
393
  elpa-generated.h \
394
395
  elpa1_test* \
  elpa2_test*\
396
  *.i
397
398

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
399
	-rm -rf modules/* private_modules/* .fortran_dependencies/*
400
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
401
402
403

distclean-local:
	-rm config-f90.h
404
405
406
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
407
	-rmdir ./src/elpa2_kernels/
408
409
	-rmdir ./src
	-rmdir ./test
410
	-rmdir ./m4
411
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
412
	-rmdir .fortran_dependencies/
413

414
415
416
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
417
  test/fortran_test_programs/elpa_test_programs_print_headers.X90 \
418
419
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
420
421
  src/redist_band.X90 \
  elpa.spec
422

423
424
425
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
426

427

428
@FORTRAN_MODULE_DEPS@
429
430
431
432
433

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

434
# $1  Object name
435
define require_elpa_lib
436
$1: libelpa@SUFFIX@.la
437
438

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