Makefile.am 7.84 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
11
lib_LTLIBRARIES = libelpa-@PACKAGE_VERSION@@SUFFIX@.la
libelpa_@PACKAGE_VERSION@@SUFFIX@_la_LINK = $(FCLINK)
libelpa_@PACKAGE_VERSION@@SUFFIX@_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
12

13

14
15
16
17
##rule to produce fortran config file:
#config_f90.h: ./config.h
#	grep "^#define" ./config.h > $@

18
libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES = src/elpa1.F90 src/elpa2.F90
19

Andreas Marek's avatar
Andreas Marek committed
20
if WITH_REAL_GENERIC_KERNEL
21
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_real.f90
22
23
endif

Andreas Marek's avatar
Andreas Marek committed
24
if WITH_COMPLEX_GENERIC_KERNEL
25
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES +=  src/elpa2_kernels/elpa2_kernels_complex.f90
26
27
endif

Andreas Marek's avatar
Andreas Marek committed
28
if WITH_REAL_GENERIC_SIMPLE_KERNEL
29
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_simple.f90
30
31
endif

Andreas Marek's avatar
Andreas Marek committed
32
if WITH_COMPLEX_GENERIC_SIMPLE_KERNEL
33
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90
34
35
endif

Andreas Marek's avatar
Andreas Marek committed
36
if WITH_REAL_BGP_KERNEL
37
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90
38
39
endif

Andreas Marek's avatar
Andreas Marek committed
40
if WITH_REAL_BGQ_KERNEL
41
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90
42
43
endif

Andreas Marek's avatar
Andreas Marek committed
44
if WITH_REAL_SSE_KERNEL
45
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
Andreas Marek's avatar
Andreas Marek committed
46
47
else
if WITH_COMPLEX_SSE_KERNEL
48
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
49
50
endif
endif
Andreas Marek's avatar
Andreas Marek committed
51
52

if WITH_REAL_AVX_BLOCK2_KERNEL
53
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
54
55
endif

Andreas Marek's avatar
Andreas Marek committed
56
if WITH_REAL_AVX_BLOCK4_KERNEL
57
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
58
59
endif

Andreas Marek's avatar
Andreas Marek committed
60
if WITH_REAL_AVX_BLOCK6_KERNEL
61
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
62
63
endif

Andreas Marek's avatar
Andreas Marek committed
64
if WITH_COMPLEX_AVX_BLOCK1_KERNEL
65
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
66
67
endif

Andreas Marek's avatar
Andreas Marek committed
68
if WITH_COMPLEX_AVX_BLOCK2_KERNEL
69
  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp
70
71
endif

Andreas Marek's avatar
Andreas Marek committed
72
#if WITH_AVX_SANDYBRIDGE
73
#  libelpa_@PACKAGE_VERSION@@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
74
#                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
Andreas Marek's avatar
Andreas Marek committed
75
76
#endif

77
# install any .mod files in the include/ dir
78
elpa_includedir = $(includedir)/elpa-@PACKAGE_VERSION@
79
80
81
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
82
83
filesdir = $(datadir)/@PACKAGE@-@PACKAGE_VERSION@/examples
dist_files_DATA = \
84
85
86
	test/read_real.F90 \
	test/read_real_gen.F90 \
	test/test_complex2.F90 \
Andreas Marek's avatar
Andreas Marek committed
87
88
	test/test_complex2_default_kernel.F90 \
	test/test_complex2_choose_kernel_with_api.F90 \
89
90
91
	test/test_complex.F90 \
	test/test_complex_gen.F90 \
	test/test_real2.F90 \
Andreas Marek's avatar
Andreas Marek committed
92
93
	test/test_real2_default_kernel.F90 \
	test/test_real2_choose_kernel_with_api.F90 \
94
	src/print_available_elpa2_kernels.F90 \
95
96
97
	test/test_real.F90 \
	test/test_real_gen.F90

98
99
dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt

100
101
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
102
pkgconfig_DATA = @PKG_CONFIG_FILE@
103

104
105
# programs
bin_PROGRAMS = \
106
107
108
109
110
111
112
113
114
115
116
117
118
	elpa1_test_real@SUFFIX@ \
	elpa1_test_complex@SUFFIX@ \
	elpa2_test_real@SUFFIX@ \
	elpa2_test_complex@SUFFIX@ \
	elpa2_print_kernels@SUFFIX@

noinst_PROGRAMS = \
	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@

build_lib = libelpa-@PACKAGE_VERSION@@SUFFIX@.la
Andreas Marek's avatar
Andreas Marek committed
119

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

123
124
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
125

126
127
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
128

129
130
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
131

132
133
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
134

135
136
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
137

138
139
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
140

141
142
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
143

144
145
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
Andreas Marek's avatar
Andreas Marek committed
146

147
148
149
150
151
152
153
154
155
check_SCRIPTS = \
	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 \
156
	elpa2_print_kernels@SUFFIX@
157
158
159

TESTS = $(check_SCRIPTS)

160
elpa1_test_real.sh:
161
	echo 'mpiexec -n 2 ./elpa1_test_real@SUFFIX@ $$TEST_FLAGS' > elpa1_test_real.sh
162
	chmod +x elpa1_test_real.sh
163

164
elpa2_test_real.sh:
165
	echo 'mpiexec -n 2 ./elpa2_test_real@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real.sh
166
	chmod +x elpa2_test_real.sh
167

168
elpa2_test_real_default_kernel.sh:
169
	echo 'mpiexec -n 2 ./elpa2_test_real_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_default_kernel.sh
170
	chmod +x elpa2_test_real_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
171

172
elpa2_test_real_choose_kernel_with_api.sh:
173
	echo 'mpiexec -n 2 ./elpa2_test_real_choose_kernel_with_api@SUFFIX@ $$TEST_FLAGS' > elpa2_test_real_choose_kernel_with_api.sh
174
	chmod +x elpa2_test_real_choose_kernel_with_api.sh
Andreas Marek's avatar
Andreas Marek committed
175

176
elpa1_test_complex.sh:
177
	echo 'mpiexec -n 2 ./elpa1_test_complex@SUFFIX@ $$TEST_FLAGS' > elpa1_test_complex.sh
178
	chmod +x elpa1_test_complex.sh
179

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

184
elpa2_test_complex_default_kernel.sh:
185
	echo 'mpiexec -n 2 ./elpa2_test_complex_default_kernel@SUFFIX@ $$TEST_FLAGS' > elpa2_test_complex_default_kernel.sh
186
	chmod +x elpa2_test_complex_default_kernel.sh
Andreas Marek's avatar
Andreas Marek committed
187

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

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

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

198
CLEANFILES = \
199
200
201
202
203
204
205
206
	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 \
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
207
	*.i
208
209

clean-local:
Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
210
211
212
213
	-rm -rf modules/* .fortran_dependencies/*

distclean-local:
	-rm config-f90.h
214
215
216
217
218
	-rmdir ./src/.deps
	-rmdir ./src
	-rmdir ./test/.deps
	-rmdir ./test
	-rmdir modules/
219
220

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

222
223
224
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status libtool
225

226

227
@FORTRAN_MODULE_DEPS@
228
229
230
231
232
233
234

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

# $1	Object name
define require_elpa_lib
235
$1: libelpa-@PACKAGE_VERSION@@SUFFIX@.la
236
237

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