Makefile.am 15.2 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/mod_pack_unpack_real_gpu.F90 \
22
			     src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
23
24
			     src/mod_compute_hh_trafo_real.F90 \
			     src/mod_compute_hh_trafo_complex.F90 \
25
			     src/mod_pack_unpack_complex.F90 \
26
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
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 \
32
                             src/elpa_qr/elpa_pdgeqrf.F90
33
34
35
36
37
38
39
40
41
42
43
44
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

45
if WITH_GPU_VERSION
46
47
  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
48
49
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

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

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

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

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

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

102
.cu.lo:
103
	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
104

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

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

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

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

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

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

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

162

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

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

171
172
173
174
175
176
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
177

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

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

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

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

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

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

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

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

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

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Andreas Marek's avatar
Andreas Marek committed
263
264
265
266
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
267
268
269
270
271
272
273
274
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
275
276
277
278
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
279
280
281
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
282
elpa2_test_real.sh:
283
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
284
	chmod +x elpa2_test_real.sh
285

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

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

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

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

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

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

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

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

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

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

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

326
327
328
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 $@

329
330
include doxygen.am

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

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
350
351
352
353
	-rm -rf modules/* .fortran_dependencies/*

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

365
366
367
368
369
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
370
371
  src/redist_band.X90 \
  nvcc_wrap
372

373
374
375
376
377
378
# 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; }
379

380
381
382
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
383

384

385
@FORTRAN_MODULE_DEPS@
386
387
388
389
390

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

391
# $1  Object name
392
define require_elpa_lib
393
$1: libelpa@SUFFIX@.la
394
395

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