Makefile.am 14.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 \
14
	                     src/elpa1_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
15 16
	                     src/elpa1.F90 \
			     src/elpa2_utilities.F90 \
17
			     src/elpa2_compute.F90 \
Andreas Marek's avatar
Andreas Marek committed
18 19 20 21 22 23
			     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
24 25 26 27 28 29 30 31 32 33 34 35
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
36
if WITH_REAL_GENERIC_KERNEL
37
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
38 39
endif

Andreas Marek's avatar
Andreas Marek committed
40
if WITH_COMPLEX_GENERIC_KERNEL
41
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
42 43
endif

Andreas Marek's avatar
Andreas Marek committed
44
if WITH_REAL_GENERIC_SIMPLE_KERNEL
45
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
46 47
endif

Andreas Marek's avatar
Andreas Marek committed
48
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
49
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
50 51
endif

Andreas Marek's avatar
Andreas Marek committed
52
if WITH_REAL_BGP_KERNEL
53
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
54 55
endif

Andreas Marek's avatar
Andreas Marek committed
56
if WITH_REAL_BGQ_KERNEL
57
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
58 59
endif

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

if WITH_REAL_AVX_BLOCK2_KERNEL
69
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
70 71
endif

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

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

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

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

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

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

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

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

124 125
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

126 127
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
128
pkgconfig_DATA = @PKG_CONFIG_FILE@
129

130 131
# programs
bin_PROGRAMS = \
132 133 134 135 136
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
137 138

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

150

151
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
152

153
if HAVE_REDIRECT
Andreas Marek's avatar
Andreas Marek committed
154
  redirect_sources = test/shared_sources/redir.c test/shared_sources/redirect.F90
155 156 157 158
else
  redirect_sources =
endif

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

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

Andreas Marek's avatar
Andreas Marek committed
182
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
183 184
elpa1_test_real_with_c@SUFFIX@_LDADD = $(build_lib)

185 186
#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
187 188

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

190
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
191

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

194
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
195

Andreas Marek's avatar
Andreas Marek committed
196
elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_SOURCES = test/fortran_test_programs/test_real2_default_kernel_qr_decomposition.F90 $(shared_sources) $(redirect_sources)
197 198 199

elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@_LDADD = $(build_lib)

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

202
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
203

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

206
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
207

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

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

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

214
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
215

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

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

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

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

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

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

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

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

273
elpa2_test_real_default_kernel_qr_decomposition.sh:
274
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel_qr_decomposition@SUFFIX@' > elpa2_test_real_default_kernel_qr_decomposition.sh
275 276
	chmod +x elpa2_test_real_default_kernel_qr_decomposition.sh

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

281
elpa1_test_complex.sh:
282
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
283
	chmod +x elpa1_test_complex.sh
284

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

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

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

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

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

306 307
include doxygen.am

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

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
327 328 329 330
	-rm -rf modules/* .fortran_dependencies/*

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

342 343 344 345 346 347
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
348

349 350 351 352 353 354 355
# 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; }

356 357 358
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
359

360

361
@FORTRAN_MODULE_DEPS@
362 363 364 365 366

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

367
# $1  Object name
368
define require_elpa_lib
369
$1: libelpa@SUFFIX@.la
370 371

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