Makefile.am 7.9 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/elpa1.F90 src/elpa2.F90
13

Andreas Marek's avatar
Andreas Marek committed
14
if WITH_REAL_GENERIC_KERNEL
15
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
16
17
endif

Andreas Marek's avatar
Andreas Marek committed
18
if WITH_COMPLEX_GENERIC_KERNEL
19
  libelpa@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
20
21
endif

Andreas Marek's avatar
Andreas Marek committed
22
if WITH_REAL_GENERIC_SIMPLE_KERNEL
23
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
24
25
endif

Andreas Marek's avatar
Andreas Marek committed
26
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
27
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
28
29
endif

Andreas Marek's avatar
Andreas Marek committed
30
if WITH_REAL_BGP_KERNEL
31
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
32
33
endif

Andreas Marek's avatar
Andreas Marek committed
34
if WITH_REAL_BGQ_KERNEL
35
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
36
37
endif

Andreas Marek's avatar
Andreas Marek committed
38
if WITH_REAL_SSE_KERNEL
39
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
40
41
else
if WITH_COMPLEX_SSE_KERNEL
42
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
43
44
endif
endif
Andreas Marek's avatar
Andreas Marek committed
45
46

if WITH_REAL_AVX_BLOCK2_KERNEL
47
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
48
49
endif

Andreas Marek's avatar
Andreas Marek committed
50
if WITH_REAL_AVX_BLOCK4_KERNEL
51
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
52
53
endif

Andreas Marek's avatar
Andreas Marek committed
54
if WITH_REAL_AVX_BLOCK6_KERNEL
55
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
56
57
endif

Andreas Marek's avatar
Andreas Marek committed
58
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
59
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
60
61
endif

Andreas Marek's avatar
Andreas Marek committed
62
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
63
  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
64
65
endif

Andreas Marek's avatar
Andreas Marek committed
66
#if WITH_AVX_SANDYBRIDGE
67
#  libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
68
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
69
70
#endif

71
# install any .mod files in the include/ dir
72
elpa_includedir = $(includedir)/elpa@SUFFIX@-@PACKAGE_VERSION@
73
74
75
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
76
filesdir = $(docdir)/examples
77
dist_files_DATA = \
78
79
80
81
82
83
84
85
86
87
88
89
90
  test/read_real.F90 \
  test/read_real_gen.F90 \
  test/test_complex2.F90 \
  test/test_complex2_default_kernel.F90 \
  test/test_complex2_choose_kernel_with_api.F90 \
  test/test_complex.F90 \
  test/test_complex_gen.F90 \
  test/test_real2.F90 \
  test/test_real2_default_kernel.F90 \
  test/test_real2_choose_kernel_with_api.F90 \
  src/print_available_elpa2_kernels.F90 \
  test/test_real.F90 \
  test/test_real_gen.F90
91

92
93
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

94
95
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
96
pkgconfig_DATA = @PKG_CONFIG_FILE@
97

98
99
# programs
bin_PROGRAMS = \
100
101
102
103
104
  elpa1_test_real@SUFFIX@ \
  elpa1_test_complex@SUFFIX@ \
  elpa2_test_real@SUFFIX@ \
  elpa2_test_complex@SUFFIX@ \
  elpa2_print_kernels@SUFFIX@
105
106

noinst_PROGRAMS = \
107
108
109
110
  elpa2_test_real_default_kernel@SUFFIX@ \
  elpa2_test_complex_default_kernel@SUFFIX@ \
  elpa2_test_real_choose_kernel_with_api@SUFFIX@ \
  elpa2_test_complex_choose_kernel_with_api@SUFFIX@
111

112
build_lib = libelpa@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
113

114
115
116
117
118
119
120
if HAVE_REDIRECT
  redirect_sources = test/redir.c test/redirect.F90
else
  redirect_sources =
endif

elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90 test/util.F90 $(redirect_sources)
121
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
122

123
124
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90 test/util.F90 $(redirect_sources)

125
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
126

127
128
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90 test/util.F90 $(redirect_sources)

129
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
130

131
132
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90 test/util.F90 $(redirect_sources)

133
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
134

135
136
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90 test/util.F90 $(redirect_sources)

137
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
138

139
140
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90 test/util.F90 $(redirect_sources)

141
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
142

143
144
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90 test/util.F90 $(redirect_sources)

145
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
146

147
148
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90 test/util.F90 $(redirect_sources)

149
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
150

151
152
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 test/util.F90 $(redirect_sources)

153
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
154

155
check_SCRIPTS = \
156
157
158
159
160
161
162
163
164
  elpa1_test_real.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  elpa1_test_complex.sh \
  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 \
  elpa2_print_kernels@SUFFIX@
165
166
167

TESTS = $(check_SCRIPTS)

168
elpa1_test_real.sh:
169
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
170
	chmod +x elpa1_test_real.sh
171

172
elpa2_test_real.sh:
173
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
174
	chmod +x elpa2_test_real.sh
175

176
elpa2_test_real_default_kernel.sh:
177
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
178
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
179

180
elpa2_test_real_choose_kernel_with_api.sh:
181
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
182
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
183

184
elpa1_test_complex.sh:
185
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
186
	chmod +x elpa1_test_complex.sh
187

188
elpa2_test_complex.sh:
189
	echo 'mpiexec -n 2 ./elpa2_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex.sh
190
	chmod +x elpa2_test_complex.sh
Andreas Marek's avatar
Andreas Marek committed
191

192
elpa2_test_complex_default_kernel.sh:
193
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
194
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
195

196
elpa2_test_complex_choose_kernel_with_api.sh:
197
	echo 'mpiexec -n 2 ./elpa2_test_complex_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_choose_kernel_with_api.sh
198
	chmod +x elpa2_test_complex_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
199
200
201

elpa2.i: $(top_srcdir)/src/elpa2.F90
	$(CPP) $(CPPFLAGS) -I$(top_builddir)/ -c $(top_srcdir)/src/elpa2.F90 -o $@
202

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

206
CLEANFILES = \
207
208
209
210
211
212
213
214
215
  elpa1_test_real.sh \
  elpa1_test_complex.sh \
  elpa2_test_real.sh \
  elpa2_test_real_default_kernel.sh \
  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 \
  *.i
216
217

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
218
219
220
221
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
222
223
224
	-rm -rf ./src/elpa2_kernels/.deps
	-rm -rf ./src/.deps
	-rm -rf ./test/.deps
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
225
	-rmdir ./src/elpa2_kernels/
226
227
	-rmdir ./src
	-rmdir ./test
228
	-rmdir ./m4
229
	-rmdir modules/
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
230
	-rmdir .fortran_dependencies/
231
232

EXTRA_DIST = fdep/fortran_dependencies.pl fdep/fortran_dependencies.mk
233

234
235
236
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
237

238

239
@FORTRAN_MODULE_DEPS@
240
241
242
243
244

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

245
# $1  Object name
246
define require_elpa_lib
247
$1: libelpa@SUFFIX@.la
248
249

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