Makefile.am 15.8 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 \
Andreas Marek's avatar
Andreas Marek committed
16
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
17
18
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
19
20
21
			     src/check_for_gpu.F90 \
			     src/mod_cuda.F90 \
			     src/interface_c_kernel.F90 \
22
			     src/mod_pack_unpack_real.F90 \
23
			     src/mod_pack_unpack_real_gpu.F90 \
24
			     src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
25
26
			     src/mod_compute_hh_trafo_real.F90 \
			     src/mod_compute_hh_trafo_complex.F90 \
27
			     src/mod_pack_unpack_complex.F90 \
28
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
29
30
			     src/elpa2.F90 \
			     src/elpa_c_interface.F90 \
31
                             src/elpa_qr/qr_utils.F90 \
Andreas Marek's avatar
Andreas Marek committed
32
                             src/elpa_qr/elpa_qrkernels.f90 \
33
                             src/elpa_qr/elpa_pdlarfb.F90 \
34
                             src/elpa_qr/elpa_pdgeqrf.F90
35
36
37
38
39
40
41
42
43
44
45
46
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

47
if WITH_GPU_VERSION
48
49
  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
50
51
endif

52
53
54
55
56
57
58
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
59
if WITH_REAL_GENERIC_KERNEL
60
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.F90
61
62
endif

Andreas Marek's avatar
Andreas Marek committed
63
if WITH_COMPLEX_GENERIC_KERNEL
64
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.F90
65
66
endif

Andreas Marek's avatar
Andreas Marek committed
67
if WITH_REAL_GENERIC_SIMPLE_KERNEL
68
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.F90
69
70
endif

Andreas Marek's avatar
Andreas Marek committed
71
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
72
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.F90
73
74
endif

Andreas Marek's avatar
Andreas Marek committed
75
if WITH_REAL_BGP_KERNEL
76
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
77
78
endif

Andreas Marek's avatar
Andreas Marek committed
79
if WITH_REAL_BGQ_KERNEL
80
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
81
82
endif

Andreas Marek's avatar
Andreas Marek committed
83
if WITH_REAL_SSE_KERNEL
84
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
85
86
else
if WITH_COMPLEX_SSE_KERNEL
87
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
88
89
endif
endif
Andreas Marek's avatar
Andreas Marek committed
90
91

if WITH_REAL_AVX_BLOCK2_KERNEL
92
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
93
94
endif

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

Andreas Marek's avatar
Andreas Marek committed
99
if WITH_REAL_AVX_BLOCK6_KERNEL
100
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
101
102
endif

Andreas Marek's avatar
Andreas Marek committed
103
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
104
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
105
106
endif

Andreas Marek's avatar
Andreas Marek committed
107
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
108
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
109
110
endif

111
.cu.lo:
112
	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
113

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

Andreas Marek's avatar
Andreas Marek committed
119
man_MANS = man/solve_evp_real.3 \
120
	   man/solve_evp_real_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
121
	   man/solve_evp_complex.3 \
122
	   man/solve_evp_complex_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
123
124
125
	   man/solve_evp_real_2stage.3 \
	   man/solve_evp_complex_2stage.3 \
	   man/get_elpa_row_col_comms.3 \
126
	   man/get_elpa_communicators.3 \
Andreas Marek's avatar
Andreas Marek committed
127
128
	   man/print_available_elpa2_kernels.1

129
# other files to distribute
130
filesdir = $(docdir)/examples
131
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
132
133
134
135
136
137
138
139
140
141
142
  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 \
143
  src/print_available_elpa2_kernels.F90
144

145
146
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

147
148
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
149
pkgconfig_DATA = @PKG_CONFIG_FILE@
150

151
152
# programs
bin_PROGRAMS = \
153
154
155
156
157
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
158
159

noinst_PROGRAMS = \
160
  elpa2_test_real_default_kernel@SUFFIX@ \
161
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
162
163
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
164
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
165
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
166
167
168
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@ \
169
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
170

171

172
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
173

174
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
175
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
176
177
178
179
else
  redirect_sources =
endif

180
181
182
183
184
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 \
185
		 test/shared_sources/mod_output_types.F90 \
186
		 test/shared_sources/prepare_matrix.F90
Andreas Marek's avatar
Andreas Marek committed
187

Andreas Marek's avatar
Andreas Marek committed
188
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
189
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
190
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
191

Andreas Marek's avatar
Andreas Marek committed
192
193
194
195
196
197
198
199
200
201
202
203
204
205
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)
206
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
207

Andreas Marek's avatar
Andreas Marek committed
208
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
209
210
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

211
212
#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
213
214

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

216
elpa2_test_real@SUFFIX@_LDFLAGS = -static
217
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
218

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

221
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
222

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

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

229
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
230

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

233
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
234

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

237
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
238

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

241
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
242

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

245
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
246

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

249
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
250

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

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

Andreas Marek's avatar
Andreas Marek committed
273
274
275
276
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
277
278
279
280
281
282
283
284
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
285
286
287
288
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
289
290
291
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
292
elpa2_test_real.sh:
293
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
294
	chmod +x elpa2_test_real.sh
295

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

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

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

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

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

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

320
elpa2_test_complex_choose_kernel_with_api.sh:
321
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
322
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
323
324
mod_precision.i: $(top_srcdir)/src/mod_precision.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/mod_precision.F90 -o $@
Andreas Marek's avatar
Andreas Marek committed
325

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

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

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

335
336
337
elpa1_compute.i: $(top_srcdir)/src/elpa1_compute.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -I$(top_srcdir)/ -c $(top_srcdir)/src/elpa1_compute.F90 -o $@

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

341
342
343
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 $@

344
345
include doxygen.am

346
CLEANFILES = \
347
  elpa/elpa-generated.h \
348
349
350
351
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
352
  elpa2_test_real_default_kernel_qr_decomposition.sh \
353
354
355
356
  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
357
358
359
360
361
  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 \
362
  *.i
363
364

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
365
366
367
368
	-rm -rf modules/* .fortran_dependencies/*

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

380
381
382
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
383
  test/fortran_test_programs/elpa_test_programs_print_headers.X90 \
384
385
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
386
387
  src/redist_band.X90 \
  nvcc_wrap
388

389
390
391
392
393
394
# 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; }
395

396
397
398
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
399

400

401
@FORTRAN_MODULE_DEPS@
402
403
404
405
406

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

407
# $1  Object name
408
define require_elpa_lib
409
$1: libelpa@SUFFIX@.la
410
411

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