Makefile.am 15.5 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/mod_precision.f90 \
13
14
                             src/mod_mpi.F90 \
			     src/mod_mpi_stubs.F90 \
15
                             src/elpa_utilities.F90 \
16
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
17
18
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
19
			     src/mod_pack_unpack_real.F90 \
20
			     src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
21
22
			     src/mod_compute_hh_trafo_real.F90 \
			     src/mod_compute_hh_trafo_complex.F90 \
23
			     src/mod_pack_unpack_complex.F90 \
24
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
25
26
			     src/elpa2.F90 \
			     src/elpa_c_interface.F90 \
27
                             src/elpa_qr/qr_utils.F90 \
Andreas Marek's avatar
Andreas Marek committed
28
                             src/elpa_qr/elpa_qrkernels.f90 \
29
                             src/elpa_qr/elpa_pdlarfb.F90 \
30
                             src/elpa_qr/elpa_pdgeqrf.F90
31
32
33
34
35
36
37
38
39
40
41
42
if HAVE_DETAILED_TIMINGS
  libelpa@SUFFIX@_la_SOURCES += 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
endif

43
44
45
46
47
48
49
if !WITH_MPI
  libelpa@SUFFIX@_la_SOURCES += src/mod_time_c.F90
if !HAVE_DETAILED_TIMINGS
  libelpa@SUFFIX@_la_SOURCES += src/ftimings/time.c
endif
endif

Andreas Marek's avatar
Andreas Marek committed
50
if WITH_REAL_GENERIC_KERNEL
51
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.F90
52
53
endif

Andreas Marek's avatar
Andreas Marek committed
54
if WITH_COMPLEX_GENERIC_KERNEL
55
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.F90
56
57
endif

Andreas Marek's avatar
Andreas Marek committed
58
if WITH_REAL_GENERIC_SIMPLE_KERNEL
59
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.F90
60
61
endif

Andreas Marek's avatar
Andreas Marek committed
62
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
63
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.F90
64
65
endif

Andreas Marek's avatar
Andreas Marek committed
66
if WITH_REAL_BGP_KERNEL
67
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
68
69
endif

Andreas Marek's avatar
Andreas Marek committed
70
if WITH_REAL_BGQ_KERNEL
71
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
72
73
endif

Andreas Marek's avatar
Andreas Marek committed
74
if WITH_REAL_SSE_KERNEL
75
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
76
77
else
if WITH_COMPLEX_SSE_KERNEL
78
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
79
80
endif
endif
Andreas Marek's avatar
Andreas Marek committed
81

82
83
84
85
if WITH_REAL_SSE_BLOCK2_KERNEL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_2hv.c
endif

Andreas Marek's avatar
Andreas Marek committed
86
if WITH_REAL_AVX_BLOCK2_KERNEL
87
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_2hv.c
88
89
endif

90
91
92
93
if WITH_REAL_SSE_BLOCK4_KERNEL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_4hv.c
endif

Andreas Marek's avatar
Andreas Marek committed
94
if WITH_REAL_AVX_BLOCK4_KERNEL
95
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_4hv.c
96
97
endif

98
99
100
101
if WITH_REAL_SSE_BLOCK6_KERNEL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse_6hv.c
endif

Andreas Marek's avatar
Andreas Marek committed
102
if WITH_REAL_AVX_BLOCK6_KERNEL
103
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_6hv.c
104
105
endif

106
107
108
109
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_1hv.cpp
endif

Andreas Marek's avatar
Andreas Marek committed
110
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
111
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_1hv.cpp
112
113
endif

114
115
116
117
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_2hv.cpp
endif

Andreas Marek's avatar
Andreas Marek committed
118
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
119
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_avx-avx2_2hv.cpp
120
121
122
endif

# install any .mod files in the include/ dir
123
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
124
nobase_elpa_include_HEADERS = $(wildcard modules/*)
Andreas Marek's avatar
Andreas Marek committed
125
nobase_elpa_include_HEADERS += elpa/elpa.h elpa/elpa_kernel_constants.h elpa/elpa_generated.h
126

Andreas Marek's avatar
Andreas Marek committed
127
man_MANS = man/solve_evp_real.3 \
128
	   man/solve_evp_real_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
129
	   man/solve_evp_complex.3 \
130
	   man/solve_evp_complex_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
131
132
133
	   man/solve_evp_real_2stage.3 \
	   man/solve_evp_complex_2stage.3 \
	   man/get_elpa_row_col_comms.3 \
134
	   man/get_elpa_communicators.3 \
Andreas Marek's avatar
Andreas Marek committed
135
136
	   man/print_available_elpa2_kernels.1

137
# other files to distribute
138
filesdir = $(docdir)/examples
139
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
140
141
142
143
144
145
146
147
148
149
150
  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 \
151
  src/print_available_elpa2_kernels.F90
152

153
154
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

155
156
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
157
pkgconfig_DATA = @PKG_CONFIG_FILE@
158

159
160
# programs
bin_PROGRAMS = \
161
162
163
164
165
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
166
167

noinst_PROGRAMS = \
168
  elpa2_test_real_default_kernel@SUFFIX@ \
169
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
170
171
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
172
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
173
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
174
175
176
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@ \
177
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
178

179

180
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
181

182
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
183
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
184
185
186
187
else
  redirect_sources =
endif

Andreas Marek's avatar
Andreas Marek committed
188
shared_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 \
189
		 test/shared_sources/blacs_infrastructure.F90 test/shared_sources/prepare_matrix.F90 test/shared_sources/mod_output_types.F90
Andreas Marek's avatar
Andreas Marek committed
190

Andreas Marek's avatar
Andreas Marek committed
191
elpa1_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_real_c_version.c $(shared_sources) $(redirect_sources)
Andreas Marek's avatar
Andreas Marek committed
192
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
193
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
194

Andreas Marek's avatar
Andreas Marek committed
195
196
197
198
199
200
201
202
203
204
205
206
207
208
elpa1_test_complex_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa1_test_complex_c_version.c $(shared_sources) $(redirect_sources)
elpa1_test_complex_c_version@SUFFIX@_LDADD = $(build_lib)
elpa1_test_complex_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)

elpa2_test_real_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa2_test_real_c_version.c $(shared_sources) $(redirect_sources)
elpa2_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)

elpa2_test_complex_c_version@SUFFIX@_SOURCES = test/c_test_programs/elpa2_test_complex_c_version.c $(shared_sources) $(redirect_sources)
elpa2_test_complex_c_version@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)


elpa1_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real.F90 $(shared_sources) $(redirect_sources)
209
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
210

Andreas Marek's avatar
Andreas Marek committed
211
elpa1_test_real_with_c@SUFFIX@_SOURCES = test/fortran_test_programs/test_real_with_c.F90 test/shared_sources/mod_from_c.F90 test/shared_sources/call_elpa1.c $(shared_sources) $(redirect_sources)
Andreas Marek's avatar
Andreas Marek committed
212
213
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

214
215
#elpa1_test_complex_with_c@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex_with_c.F90 test/shared_sources/mod_from_c.F90 test/shared_sources/call_elpa1.c $(shared_sources) $(redirect_sources)
#elpa1_test_complex_with_c@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
216
217

elpa2_test_real@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2.F90 $(shared_sources) $(redirect_sources)
218

219
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
220

Andreas Marek's avatar
Andreas Marek committed
221
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel.F90 $(shared_sources) $(redirect_sources)
222

223
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
224

Andreas Marek's avatar
Andreas Marek committed
225
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
226
227
228

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

Andreas Marek's avatar
Andreas Marek committed
229
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_choose_kernel_with_api.F90 $(shared_sources) $(redirect_sources)
230

231
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
232

Andreas Marek's avatar
Andreas Marek committed
233
elpa1_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex.F90 $(shared_sources) $(redirect_sources)
234

235
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
236

Andreas Marek's avatar
Andreas Marek committed
237
elpa2_test_complex@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2.F90 $(shared_sources) $(redirect_sources)
238

239
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
240

Andreas Marek's avatar
Andreas Marek committed
241
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_default_kernel.F90 $(shared_sources) $(redirect_sources)
242

243
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
244

Andreas Marek's avatar
Andreas Marek committed
245
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/fortran_test_programs/test_complex2_choose_kernel_with_api.F90 $(shared_sources) $(redirect_sources)
246

247
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
248

Andreas Marek's avatar
Andreas Marek committed
249
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 $(shared_sources) $(redirect_sources)
250

251
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
252

253
check_SCRIPTS = \
254
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
255
256
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
Andreas Marek's avatar
Andreas Marek committed
257
258
259
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
260
261
262
263
264
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
265
  elpa2_test_real_default_kernel_qr_decomposition.sh \
266
267
268
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
269
270

TESTS = $(check_SCRIPTS)
271
elpa1_test_real.sh:
272
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
273
	chmod +x elpa1_test_real.sh
274

Andreas Marek's avatar
Andreas Marek committed
275
276
277
278
elpa1_test_real_with_c.sh:
	echo 'mpiexec -n 2 ./elpa1_test_real_with_c@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_with_c.sh
	chmod +x elpa1_test_real_with_c.sh

Andreas Marek's avatar
Andreas Marek committed
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
elpa2_test_real_c_version.sh:
	echo 'mpiexec -n 2 ./elpa2_test_real_c_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_c_version.sh
	chmod +x elpa2_test_real_c_version.sh

elpa2_test_complex_c_version.sh:
	echo 'mpiexec -n 2 ./elpa2_test_complex_c_version@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_c_version.sh
	chmod +x elpa2_test_complex_c_version.sh

elpa1_test_real_c_version.sh:
	echo 'mpiexec -n 2 ./elpa1_test_real_c_version@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real_c_version.sh
	chmod +x elpa1_test_real_c_version.sh

elpa1_test_complex_c_version.sh:
	echo 'mpiexec -n 2 ./elpa1_test_complex_c_version@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex_c_version.sh
	chmod +x elpa1_test_complex_c_version.sh
294
elpa2_test_real.sh:
295
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
296
	chmod +x elpa2_test_real.sh
297

298
elpa2_test_real_default_kernel.sh:
299
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
300
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
301

302
elpa2_test_real_default_kernel_qr_decomposition.sh:
303
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
304
305
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

306
elpa2_test_real_choose_kernel_with_api.sh:
307
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
308
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
309

310
elpa1_test_complex.sh:
311
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
312
	chmod +x elpa1_test_complex.sh
313

314
elpa2_test_complex.sh:
315
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
316
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
317

318
elpa2_test_complex_default_kernel.sh:
319
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
320
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
321

322
elpa2_test_complex_choose_kernel_with_api.sh:
323
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
324
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
325

Andreas Marek's avatar
Andreas Marek committed
326
327
328
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
329
330
elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
331

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

335
336
337
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 $@

338
339
340
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 $@

341
342
include doxygen.am

343
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
344
  elpa-generated.h \
345
346
347
348
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
349
  elpa2_test_real_default_kernel_qr_decomposition.sh \
350
351
352
353
  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 \
Andreas Marek's avatar
Andreas Marek committed
354
355
356
357
358
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
359
  *.i
360
361

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
362
363
364
365
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
366
367
368
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
369
	-rm -rf ./elpa/elpa_generated.h
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
370
	-rmdir ./src/elpa2_kernels/
371
372
	-rmdir ./src
	-rmdir ./test
373
	-rmdir ./m4
374
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
375
	-rmdir .fortran_dependencies/
376

377
378
379
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
380
  test/fortran_test_programs/elpa_test_programs_print_headers.X90 \
381
382
383
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
  src/redist_band.X90
384

385
386
387
388
389
390
391
# Rules to re-generated the headers
elpa/elpa_generated.h: $(top_srcdir)/src/elpa_c_interface.F90
	grep -h "^ *!c>" $^ | sed 's/^ *!c>//;' > $@ || { rm $@; exit 1; }

test/shared_sources/generated.h: $(wildcard $(top_srcdir)/test/shared_sources/*.F90)
	grep -h "^ *!c>" $^ | sed 's/^ *!c>//;' > $@ || { rm $@; exit 1; }

392
393
394
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
395

396

397
@FORTRAN_MODULE_DEPS@
398
399
400
401
402

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

403
# $1  Object name
404
define require_elpa_lib
405
$1: libelpa@SUFFIX@.la
406
407

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