Makefile.am 14.3 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 \
14
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
15 16
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
17
			     src/mod_pack_unpack_real.F90 \
18
			     src/elpa2_kernels/mod_single_hh_trafo_real.F90 \
19
			     src/mod_pack_unpack_complex.F90 \
20
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
21 22 23 24 25 26
			     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
27 28 29 30 31 32 33 34 35 36 37 38
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

Andreas Marek's avatar
Andreas Marek committed
39
if WITH_REAL_GENERIC_KERNEL
40
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
41 42
endif

Andreas Marek's avatar
Andreas Marek committed
43
if WITH_COMPLEX_GENERIC_KERNEL
44
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
45 46
endif

Andreas Marek's avatar
Andreas Marek committed
47
if WITH_REAL_GENERIC_SIMPLE_KERNEL
48
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
49 50
endif

Andreas Marek's avatar
Andreas Marek committed
51
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
52
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
53 54
endif

Andreas Marek's avatar
Andreas Marek committed
55
if WITH_REAL_BGP_KERNEL
56
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
57 58
endif

Andreas Marek's avatar
Andreas Marek committed
59
if WITH_REAL_BGQ_KERNEL
60
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
61 62
endif

Andreas Marek's avatar
Andreas Marek committed
63
if WITH_REAL_SSE_KERNEL
64
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
65 66
else
if WITH_COMPLEX_SSE_KERNEL
67
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
68 69
endif
endif
Andreas Marek's avatar
Andreas Marek committed
70 71

if WITH_REAL_AVX_BLOCK2_KERNEL
72
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
73 74
endif

Andreas Marek's avatar
Andreas Marek committed
75
if WITH_REAL_AVX_BLOCK4_KERNEL
76
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
77 78
endif

Andreas Marek's avatar
Andreas Marek committed
79
if WITH_REAL_AVX_BLOCK6_KERNEL
80
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
81 82
endif

Andreas Marek's avatar
Andreas Marek committed
83
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
84
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
85 86
endif

Andreas Marek's avatar
Andreas Marek committed
87
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
88
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
89 90
endif

Andreas Marek's avatar
Andreas Marek committed
91
#if WITH_AVX_SANDYBRIDGE
92
#  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
93
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
94 95
#endif

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

Andreas Marek's avatar
Andreas Marek committed
101
man_MANS = man/solve_evp_real.3 \
102
	   man/solve_evp_real_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
103
	   man/solve_evp_complex.3 \
104
	   man/solve_evp_complex_1stage.3 \
Andreas Marek's avatar
Andreas Marek committed
105 106 107
	   man/solve_evp_real_2stage.3 \
	   man/solve_evp_complex_2stage.3 \
	   man/get_elpa_row_col_comms.3 \
108
	   man/get_elpa_communicators.3 \
Andreas Marek's avatar
Andreas Marek committed
109 110
	   man/print_available_elpa2_kernels.1

111
# other files to distribute
112
filesdir = $(docdir)/examples
113
dist_files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
114 115 116 117 118 119 120 121 122 123 124
  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 \
125
  src/print_available_elpa2_kernels.F90
126

127 128
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

129 130
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
131
pkgconfig_DATA = @PKG_CONFIG_FILE@
132

133 134
# programs
bin_PROGRAMS = \
135 136 137 138 139
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
140 141

noinst_PROGRAMS = \
142
  elpa2_test_real_default_kernel@SUFFIX@ \
143
  elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@ \
144 145
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
146
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@ \
147
  elpa1_test_real_c_version@SUFFIX@ \
Andreas Marek's avatar
Andreas Marek committed
148 149 150
  elpa1_test_complex_c_version@SUFFIX@ \
  elpa2_test_real_c_version@SUFFIX@ \
  elpa2_test_complex_c_version@SUFFIX@ \
151
  elpa1_test_real_with_c@SUFFIX@
Andreas Marek's avatar
Andreas Marek committed
152

153

154
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
155

156
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
157
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
158 159 160 161
else
  redirect_sources =
endif

Andreas Marek's avatar
Andreas Marek committed
162 163 164
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
165
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
166
elpa1_test_real_c_version@SUFFIX@_LDADD = $(build_lib)
167
elpa1_test_real_c_version@SUFFIX@_LINK = $(LINK) $(FCLIBS)
Andreas Marek's avatar
Andreas Marek committed
168

Andreas Marek's avatar
Andreas Marek committed
169 170 171 172 173 174 175 176 177 178 179 180 181 182
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)
183
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
184

Andreas Marek's avatar
Andreas Marek committed
185
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
186 187
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

188 189
#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
190 191

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

193
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
194

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

197
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
198

Andreas Marek's avatar
Andreas Marek committed
199
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
200 201 202

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

205
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
206

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

209
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
210

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

213
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
214

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

217
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
218

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

221
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
222

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

225
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
226

227
check_SCRIPTS = \
228
  elpa1_test_real.sh \
Andreas Marek's avatar
Andreas Marek committed
229 230
  elpa1_test_real_with_c.sh \
  elpa1_test_real_c_version.sh \
Andreas Marek's avatar
Andreas Marek committed
231 232 233
  elpa1_test_complex_c_version.sh \
  elpa2_test_real_c_version.sh \
  elpa2_test_complex_c_version.sh \
234 235 236 237 238
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  elpa2_test_complex.sh \
  elpa2_test_complex_default_kernel.sh \
239
  elpa2_test_real_default_kernel_qr_decomposition.sh \
240 241 242
  elpa2_test_real_choose_kernel_with_api.sh \
  elpa2_test_complex_choose_kernel_with_api.sh \
  elpa2_print_kernels@SUFFIX@
243 244

TESTS = $(check_SCRIPTS)
245
elpa1_test_real.sh:
246
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
247
	chmod +x elpa1_test_real.sh
248

Andreas Marek's avatar
Andreas Marek committed
249 250 251 252
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
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
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
268
elpa2_test_real.sh:
269
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
270
	chmod +x elpa2_test_real.sh
271

272
elpa2_test_real_default_kernel.sh:
273
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
274
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
275

276
elpa2_test_real_default_kernel_qr_decomposition.sh:
277
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
278 279
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

280
elpa2_test_real_choose_kernel_with_api.sh:
281
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
282
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
283

284
elpa1_test_complex.sh:
285
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
286
	chmod +x elpa1_test_complex.sh
287

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

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

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

Andreas Marek's avatar
Andreas Marek committed
300 301 302
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
303 304
elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
305

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

309 310
include doxygen.am

311
CLEANFILES = \
Andreas Marek's avatar
Andreas Marek committed
312
  elpa-generated.h \
313 314 315 316
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
317
  elpa2_test_real_default_kernel_qr_decomposition.sh \
318 319 320 321
  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
322 323 324 325 326
  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 \
327
  *.i
328 329

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
330 331 332 333
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
334 335 336
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
337
	-rm -rf ./elpa/elpa_generated.h
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
338
	-rmdir ./src/elpa2_kernels/
339 340
	-rmdir ./src
	-rmdir ./test
341
	-rmdir ./m4
342
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
343
	-rmdir .fortran_dependencies/
344

345 346 347 348 349 350
EXTRA_DIST = \
  fdep/fortran_dependencies.pl \
  fdep/fortran_dependencies.mk \
  src/elpa_reduce_add_vectors.X90 \
  src/elpa_transpose_vectors.X90 \
  src/redist_band.X90
351

352 353 354 355 356 357 358
# 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; }

359 360 361
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
362

363

364
@FORTRAN_MODULE_DEPS@
365 366 367 368 369

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

370
# $1  Object name
371
define require_elpa_lib
372
$1: libelpa@SUFFIX@.la
373 374

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