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

44
if WITH_GPU_VERSION
45
46
  libelpa@SUFFIX@_la_SOURCES +=  src/cudaFunctions.cu src/cuUtils.cu src/ev_tridi_band_gpu_c_v2.cu
  #src/interface_cuda.F90 src/interface_c_kernel.F90 src/ev_tridi_band_gpu_c_v2.cu src/cuUtils.cu
47
48
endif

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

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

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

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

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

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

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

if WITH_REAL_AVX_BLOCK2_KERNEL
82
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
83
84
endif

Andreas Marek's avatar
Andreas Marek committed
85
if WITH_REAL_AVX_BLOCK4_KERNEL
86
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
87
88
endif

Andreas Marek's avatar
Andreas Marek committed
89
if WITH_REAL_AVX_BLOCK6_KERNEL
90
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
91
92
endif

Andreas Marek's avatar
Andreas Marek committed
93
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
94
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
95
96
endif

Andreas Marek's avatar
Andreas Marek committed
97
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
98
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
99
100
endif

101
.cu.lo:
102
	NVCC="$(NVCC)" libtool --mode=compile --tag=CC $(top_srcdir)/nvcc_wrap $(NVCCFLAGS) $(LDFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/  -c $< -o $@
Andreas Marek's avatar
Andreas Marek committed
103

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

Andreas Marek's avatar
Andreas Marek committed
109
man_MANS = man/solve_evp_real.3 \
110
	   man/solve_evp_real_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
111
	   man/solve_evp_complex.3 \
112
	   man/solve_evp_complex_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
113
114
115
	   man/solve_evp_real_2stage.3 \
	   man/solve_evp_complex_2stage.3 \
	   man/get_elpa_row_col_comms.3 \
116
	   man/get_elpa_communicators.3 \
Andreas Marek's avatar
Andreas Marek committed
117
118
	   man/print_available_elpa2_kernels.1

119
# other files to distribute
120
filesdir = $(docdir)/examples
121
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
122
123
124
125
126
127
128
129
130
131
132
  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 \
133
  src/print_available_elpa2_kernels.F90
134

135
136
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

137
138
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
139
pkgconfig_DATA = @PKG_CONFIG_FILE@
140

141
142
# programs
bin_PROGRAMS = \
143
144
145
146
147
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
148
149

noinst_PROGRAMS = \
150
  elpa2_test_real_default_kernel@SUFFIX@ \
151
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
152
153
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
154
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
155
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
156
157
158
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@ \
159
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
160

161

162
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
163

164
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
165
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
166
167
168
169
else
  redirect_sources =
endif

170
171
172
173
174
175
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 \
		 test/shared_sources/blacs_infrastructure.F90 \
		 test/shared_sources/prepare_matrix.F90
Andreas Marek's avatar
Andreas Marek committed
176

Andreas Marek's avatar
Andreas Marek committed
177
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
178
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
179
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
180

Andreas Marek's avatar
Andreas Marek committed
181
182
183
184
185
186
187
188
189
190
191
192
193
194
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)
195
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
196

Andreas Marek's avatar
Andreas Marek committed
197
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
198
199
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

200
201
#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
202
203

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

205
elpa2_test_real@SUFFIX@_LDFLAGS = -static
206
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
207

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

210
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
211

Andreas Marek's avatar
Andreas Marek committed
212
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
213
214
215

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

218
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
219

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

222
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
223

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

226
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
227

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

230
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
231

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

234
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
235

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

238
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
239

240
check_SCRIPTS = \
241
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
242
243
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
Andreas Marek's avatar
Andreas Marek committed
244
245
246
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
247
248
249
250
251
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
252
  elpa2_test_real_default_kernel_qr_decomposition.sh \
253
254
255
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
256
257

TESTS = $(check_SCRIPTS)
258
elpa1_test_real.sh:
259
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
260
	chmod +x elpa1_test_real.sh
261

Andreas Marek's avatar
Andreas Marek committed
262
263
264
265
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
266
267
268
269
270
271
272
273
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

Andreas Marek's avatar
Andreas Marek committed
274
275
276
277
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

Andreas Marek's avatar
Andreas Marek committed
278
279
280
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
281
elpa2_test_real.sh:
282
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
283
	chmod +x elpa2_test_real.sh
284

285
elpa2_test_real_default_kernel.sh:
286
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
287
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
288

289
elpa2_test_real_default_kernel_qr_decomposition.sh:
290
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
291
292
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

293
elpa2_test_real_choose_kernel_with_api.sh:
294
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
295
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
296

297
elpa1_test_complex.sh:
298
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
299
	chmod +x elpa1_test_complex.sh
300

301
elpa2_test_complex.sh:
302
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
303
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
304

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

309
elpa2_test_complex_choose_kernel_with_api.sh:
310
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
311
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
312

Andreas Marek's avatar
Andreas Marek committed
313
elpa2_utilities.i: $(top_srcdir)/src/elpa2_utilities.F90
314
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/elpa2_utilities.F90 -o $@
Andreas Marek's avatar
Andreas Marek committed
315

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

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

322
323
324
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 $@

325
326
include doxygen.am

327
CLEANFILES = \
328
  elpa/elpa-generated.h \
329
330
331
332
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
333
  elpa2_test_real_default_kernel_qr_decomposition.sh \
334
335
336
337
  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
338
339
340
341
342
  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 \
343
  *.i
344
345

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
346
347
348
349
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
350
351
352
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
353
	-rm -rf ./elpa/elpa_generated.h
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
354
	-rmdir ./src/elpa2_kernels/
355
356
	-rmdir ./src
	-rmdir ./test
357
	-rmdir ./m4
358
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
359
	-rmdir .fortran_dependencies/
360

361
362
363
364
365
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
366
367
  src/redist_band.X90 \
  nvcc_wrap
368

369
370
371
372
373
374
# 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; }
375

376
377
378
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
379

380

381
@FORTRAN_MODULE_DEPS@
382
383
384
385
386

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

387
# $1  Object name
388
define require_elpa_lib
389
$1: libelpa@SUFFIX@.la
390
391

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