summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md5
-rw-r--r--packages/base/hmatrix.cabal31
2 files changed, 28 insertions, 8 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 157036e..94964d2 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -55,6 +55,11 @@ using this method.
55 55
56[winpack]: https://github.com/downloads/AlbertoRuiz/hmatrix/gsl-lapack-windows.zip 56[winpack]: https://github.com/downloads/AlbertoRuiz/hmatrix/gsl-lapack-windows.zip
57 57
58### Alternative Windows build
591) > cabal update
602) Download and unzip somewhere OpenBLAS http://www.openblas.net/
613) > cabal install --flags=openblas --extra-lib-dirs=C:\...\OpenBLAS\lib --extra-include-dir=C:\...\OpenBLAS\include
62
58## Tests ############################################### 63## Tests ###############################################
59 64
60After installation we can verify that the library works as expected: 65After installation we can verify that the library works as expected:
diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal
index 31bea3e..3a11135 100644
--- a/packages/base/hmatrix.cabal
+++ b/packages/base/hmatrix.cabal
@@ -96,13 +96,13 @@ library
96 96
97 cpp-options: -DBINARY 97 cpp-options: -DBINARY
98 98
99 if flag(openblas)
100 extra-lib-dirs: /usr/lib/openblas/lib
101 extra-libraries: openblas
102 else
103 extra-libraries: blas lapack
104
105 if os(OSX) 99 if os(OSX)
100 if flag(openblas)
101 extra-lib-dirs: /opt/local/lib/openblas/lib
102 extra-libraries: openblas
103 else
104 extra-libraries: blas lapack
105
106 extra-lib-dirs: /opt/local/lib/ 106 extra-lib-dirs: /opt/local/lib/
107 include-dirs: /opt/local/include/ 107 include-dirs: /opt/local/include/
108 extra-lib-dirs: /usr/local/lib/ 108 extra-lib-dirs: /usr/local/lib/
@@ -112,14 +112,29 @@ library
112 frameworks: Accelerate 112 frameworks: Accelerate
113 113
114 if os(freebsd) 114 if os(freebsd)
115 if flag(openblas)
116 extra-lib-dirs: /usr/local/lib/openblas/lib
117 extra-libraries: openblas
118 else
119 extra-libraries: blas lapack
120
115 extra-lib-dirs: /usr/local/lib 121 extra-lib-dirs: /usr/local/lib
116 include-dirs: /usr/local/include 122 include-dirs: /usr/local/include
117 extra-libraries: blas lapack gfortran 123 extra-libraries: gfortran
118 124
119 if os(windows) 125 if os(windows)
120 extra-libraries: blas lapack 126 if flag(openblas)
127 extra-libraries: libopenblas
128 else
129 extra-libraries: blas lapack
121 130
122 if os(linux) 131 if os(linux)
132 if flag(openblas)
133 extra-lib-dirs: /usr/lib/openblas/lib
134 extra-libraries: openblas
135 else
136 extra-libraries: blas lapack
137
123 if arch(x86_64) 138 if arch(x86_64)
124 cc-options: -fPIC 139 cc-options: -fPIC
125 140