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
16
17
18
19
20
libelpa@SUFFIX@_public_la_SOURCES = \
        src/elpa1.F90 \
        src/elpa2.F90 \
        src/elpa2_utilities.F90 \
        src/elpa_utilities.F90

# internal parts
noinst_LTLIBRARIES += libelpa@SUFFIX@_private.la
21
libelpa@SUFFIX@_private_la_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
22
libelpa@SUFFIX@_private_la_SOURCES = \
23
24
25
26
27
28
29
30
        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 \
31
        src/elpa1_compute.F90 \
32
        src/elpa2_compute.F90 \
33
34
        src/elpa2_kernels/mod_fortran_interfaces.F90 \
        src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
35
36
37
38
39
40
        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

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

46
47
48
49
50
51
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 =


52
if HAVE_DETAILED_TIMINGS
53
  libelpa@SUFFIX@_private_la_SOURCES += \
54
55
56
57
58
59
60
61
62
        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
63
64
endif

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

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

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

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

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

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

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

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

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

Andreas Marek's avatar
Andreas Marek committed
108
if WITH_REAL_AVX_BLOCK2_KERNEL
109
110
111
112
113
  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
114
115
endif

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

Andreas Marek's avatar
Andreas Marek committed
120
if WITH_REAL_AVX_BLOCK4_KERNEL
121
122
123
124
125
  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
126
127
endif

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

Andreas Marek's avatar
Andreas Marek committed
132
if WITH_REAL_AVX_BLOCK6_KERNEL
133
134
135
136
137
  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
138
139
endif

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

Andreas Marek's avatar
Andreas Marek committed
144
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
145
146
147
148
149
  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
150
151
endif

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

Andreas Marek's avatar
Andreas Marek committed
156
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
157
158
159
160
161
  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
162
163
endif

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

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

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

183
# other files to distribute
184
filesdir = $(docdir)/examples
185
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
186
187
188
189
190
191
192
193
194
195
196
  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 \
197
  src/elpa2_print_kernels.F90
198

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

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

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

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

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
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
243

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

250
if !WITH_OPENMP
251
elpa1_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_real_c_version.c
Andreas Marek's avatar
Andreas Marek committed
252
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
253
elpa1_test_real_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
254
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
255
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
256

257
elpa1_test_complex_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_complex_c_version.c
Andreas Marek's avatar
Andreas Marek committed
258
elpa1_test_complex_c_version@SUFFIX@_LDADD = $(build_lib)
259
elpa1_test_complex_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
Andreas Marek's avatar
Andreas Marek committed
260
elpa1_test_complex_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
261
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
262

263
elpa2_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa2_test_real_c_version.c
Andreas Marek's avatar
Andreas Marek committed
264
elpa2_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
265
elpa2_test_real_c_version@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
Andreas Marek's avatar
Andreas Marek committed
266
elpa2_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
267
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
268

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

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

281
elpa1_test_real_with_c@SUFFIX@_SOURCES = test/fortran_test_programs/test_real_with_c.F90
Andreas Marek's avatar
Andreas Marek committed
282
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)
283
elpa1_test_real_with_c@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
284
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
285

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

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

296

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

302
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_choose_kernel_with_api.F90
303
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
304
elpa2_test_real_choose_kernel_with_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
305
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
306

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

312

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

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

323
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_choose_kernel_with_api.F90
324
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
325
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
326
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
327

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

332
check_SCRIPTS = \
333
334
335
336
337
338
339
340
341
342
  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_default_kernel_qr_decomposition@SUFFIX@.sh \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@.sh \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@.sh \
343
  elpa2_print_kernels@SUFFIX@
344

345
346
if !WITH_OPENMP
check_SCRIPTS += \
347
348
349
350
  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
351
endif
352

Andreas Marek's avatar
Andreas Marek committed
353

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

366
# Preprocessed files (just used for manual inspection)
Andreas Marek's avatar
Andreas Marek committed
367
368
369
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
370
371
elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
372

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

376
377
378
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 $@

379
380
381
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 $@

382
383
384
385
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 $@


386
387
include doxygen.am

388
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
389
  elpa-generated.h \
390
391
  elpa1_test* \
  elpa2_test*\
392
  *.i
393
394

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
395
	-rm -rf modules/* private_modules/* .fortran_dependencies/*
396
	-rm -rf $(generated_headers)
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
397
398
399

distclean-local:
	-rm config-f90.h
400
401
402
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
403
	-rmdir ./src/elpa2_kernels/
404
405
	-rmdir ./src
	-rmdir ./test
406
	-rmdir ./m4
407
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
408
	-rmdir .fortran_dependencies/
409

410
411
412
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
413
  test/fortran_test_programs/elpa_test_programs_print_headers.X90 \
414
415
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
416
417
  src/redist_band.X90 \
  elpa.spec
418

419
420
421
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
422

423

424
@FORTRAN_MODULE_DEPS@
425
426
427
428
429

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

430
# $1  Object name
431
define require_elpa_lib
432
$1: libelpa@SUFFIX@.la
433
434

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