Makefile.am 15.6 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/elpa2_kernels/mod_fortran_interfaces.F90 \
16
                             src/elpa_utilities.F90 \
17
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
18 19
	                     src/elpa1.F90 \
			     src/elpa2_utilities.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/aligned_mem.F90 \
26
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
27 28
			     src/elpa2.F90 \
			     src/elpa_c_interface.F90 \
29
                             src/elpa_qr/qr_utils.F90 \
Andreas Marek's avatar
Andreas Marek committed
30
                             src/elpa_qr/elpa_qrkernels.f90 \
31
                             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 46 47 48 49 50 51
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
52
if WITH_REAL_GENERIC_KERNEL
53
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.F90
54 55
endif

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

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

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

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

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

76
if WITH_REAL_SSE_ASSEMBLY_KERNEL
77
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
78
else
79
if WITH_COMPLEX_SSE_ASSEMBLY_KERNEL
80
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
81 82
endif
endif
Andreas Marek's avatar
Andreas Marek committed
83

84 85 86 87
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
88
if WITH_REAL_AVX_BLOCK2_KERNEL
89
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_2hv.c
90 91
endif

92 93 94 95
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
96
if WITH_REAL_AVX_BLOCK4_KERNEL
97
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_4hv.c
98 99
endif

100 101 102 103
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
104
if WITH_REAL_AVX_BLOCK6_KERNEL
105
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_avx-avx2_6hv.c
106 107
endif

108
if WITH_COMPLEX_SSE_BLOCK1_KERNEL
Andreas Marek's avatar
Andreas Marek committed
109
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_1hv.c
110 111
endif

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

116
if WITH_COMPLEX_SSE_BLOCK2_KERNEL
Andreas Marek's avatar
Andreas Marek committed
117
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse_2hv.c
118 119
endif

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

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

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

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

155 156
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

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

161 162
# programs
bin_PROGRAMS = \
163 164 165
  elpa2_print_kernels@SUFFIX@

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

181

182
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
183

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

Andreas Marek's avatar
Andreas Marek committed
190
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 \
191
		 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
192

Andreas Marek's avatar
Andreas Marek committed
193
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
194
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
195
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
196

Andreas Marek's avatar
Andreas Marek committed
197 198 199 200 201 202 203 204 205 206 207 208 209 210
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)
211
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
212

Andreas Marek's avatar
Andreas Marek committed
213
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
214 215
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

216 217
#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
218 219

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

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

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

225
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
226

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

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

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

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

237
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
238

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

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

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

245
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
246

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

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

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

253
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
254

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

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

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

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

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

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

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

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

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

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

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

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

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

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

343 344
include doxygen.am

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

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

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

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

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

394 395 396
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
397

398

399
@FORTRAN_MODULE_DEPS@
400 401 402 403 404

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

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

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