-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.internal
75 lines (67 loc) · 3.17 KB
/
Makefile.internal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# ----------------------------------------
# precision generation
#
# this file is NOT included in the release:
# all precision generation is done prior to release by MakeMagmaRelease.pl,
# and then this file is deleted.
Makefile.gen: $(Makefiles) tools/magmasubs.py
echo "# ----------------------------------------" > $@
$(codegen) --make --prefix libmagma $(libmagma_src) >> $@
$(codegen) --make --prefix libmagma_dynamic $(libmagma_dynamic_src) >> $@
$(codegen) --make --prefix libtest $(libtest_src) >> $@
$(codegen) --make --prefix liblapacktest $(liblapacktest_src) >> $@
$(codegen) --make --prefix testing $(testing_src) >> $@
$(codegen) --make --prefix libsparse $(libsparse_src) >> $@
$(codegen) --make --prefix libsparse_dynamic $(libsparse_dynamic_src) >> $@
$(codegen) --make --prefix sparse_testing $(sparse_testing_src) >> $@
$(codegen) --make --prefix header $(hdr) >> $@
newlines := perl -pe 's/ +/\n/g'
generate: CMake.src
CMake.src: Makefile.gen
echo "# auto-generated by 'make $@'" > $@
echo "# ----------------------------------------" >> $@
echo "set( libmagma_all" >> $@
echo "$(libmagma_all) )" | $(newlines) >> $@
echo >> $@
echo "set( libblas_fix_src" >> $@
echo "$(libblas_fix_src) )" | $(newlines) >> $@
echo >> $@
echo "set( libtest_all" >> $@
echo "$(libtest_all) )" | $(newlines) >> $@
echo >> $@
echo "set( liblapacktest_all" >> $@
echo "$(liblapacktest_all) )" | $(newlines) >> $@
echo >> $@
echo "set( testing_all" >> $@
echo "$(testing_all) )" | $(newlines) >> $@
echo >> $@
echo "set( libsparse_all" >> $@
echo "$(libsparse_all) )" | $(newlines) >> $@
echo >> $@
echo "set( sparse_testing_all" >> $@
echo "$(sparse_testing_all) )" | $(newlines) >> $@
# cleanall (defined in Makefile) also deletes Makefile.gen/src
cleanall: cleanmake
cleanmake:
-rm -f Makefile.gen Makefile.src CMake.src
# preprocessed headers for Fortran wrappers
wrapper_headers = \
include/magma_s.i \
include/magma_d.i \
include/magma_c.i \
include/magma_z.i \
include/magmablas_s.i \
include/magmablas_d.i \
include/magmablas_c.i \
include/magmablas_z.i \
# generate Fortran wrappers directly from the headers
wrappers: $(wrapper_headers)
tools/fortran_wrappers.pl include/magma_s.i
tools/fortran_wrappers.pl include/magma_d.i
tools/fortran_wrappers.pl include/magma_c.i
tools/fortran_wrappers.pl include/magma_z.i
tools/fortran_wrappers.pl include/magmablas_s.i
tools/fortran_wrappers.pl include/magmablas_d.i
tools/fortran_wrappers.pl include/magmablas_c.i
tools/fortran_wrappers.pl include/magmablas_z.i
rm $^