summaryrefslogtreecommitdiff
path: root/packages/base/hmatrix.cabal
blob: 7bfc7622a7297fce6857968c3a1f0d63f062c57b (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
Name:               hmatrix
Version:            0.17.0.0
License:            BSD3
License-file:       LICENSE
Author:             Alberto Ruiz
Maintainer:         Alberto Ruiz
Stability:          provisional
Homepage:           https://github.com/albertoruiz/hmatrix
Synopsis:           Numeric Linear Algebra
Description:        Linear algebra based on BLAS and LAPACK.
                    .
                    Code examples: <http://dis.um.es/~alberto/hmatrix/hmatrix.html>

Category:           Math
tested-with:        GHC==7.8

cabal-version:      >=1.8

build-type:         Simple

extra-source-files: THANKS.md CHANGELOG

extra-source-files: src/C/lapack-aux.h

flag openblas
    description:    Link with OpenBLAS (https://github.com/xianyi/OpenBLAS) optimized libraries.
    default:        False
    manual: True 

library

    Build-Depends:      base >= 4.8 && < 5,
                        binary,
                        array,
                        deepseq,
                        random,
                        split,
                        bytestring,
                        storable-complex,
                        vector >= 0.8

    hs-source-dirs:     src

    exposed-modules:    Numeric.LinearAlgebra
                        Numeric.LinearAlgebra.Devel
                        Numeric.LinearAlgebra.Data
                        Numeric.LinearAlgebra.HMatrix
                        Numeric.LinearAlgebra.Static

    other-modules:      Data.Packed,
                        Data.Packed.Vector
                        Data.Packed.Matrix
                        Data.Packed.Foreign
                        Data.Packed.ST
                        Data.Packed.Development
                        Data.Packed.Internal
                        Data.Packed.Internal.Common
                        Data.Packed.Internal.Signatures
                        Data.Packed.Internal.Vector
                        Data.Packed.Internal.Matrix
                        Data.Packed.IO
                        Numeric.Chain
                        Numeric.Vectorized
                        Numeric.Vector
                        Numeric.Matrix
                        Data.Packed.Internal.Numeric
                        Data.Packed.Numeric
                        Numeric.LinearAlgebra.LAPACK
                        Numeric.LinearAlgebra.Algorithms
                        Numeric.Container
                        Numeric.LinearAlgebra.Util.Convolution
                        Numeric.LinearAlgebra.Util.CG
                        Numeric.LinearAlgebra.Random
                        Numeric.Conversion
                        Numeric.Sparse
                        Numeric.LinearAlgebra.Static.Internal
                        Numeric.LinearAlgebra.Util

    C-sources:          src/C/lapack-aux.c
                        src/C/vector-aux.c


    extensions:         ForeignFunctionInterface,
                        CPP

    ghc-options:        -Wall
                        -fno-warn-missing-signatures
                        -fno-warn-orphans

    cc-options:         -O4 -msse2 -Wall

    cpp-options:        -DBINARY

    if flag(openblas)
        extra-lib-dirs:     /usr/lib/openblas/lib    
        extra-libraries:    openblas
    else 
        extra-libraries:    blas lapack

    if os(OSX)
        extra-lib-dirs: /opt/local/lib/
        include-dirs: /opt/local/include/
        extra-lib-dirs: /usr/local/lib/
        include-dirs: /usr/local/include/
        if arch(i386)
            cc-options: -arch i386
        frameworks: Accelerate

    if os(freebsd)
       extra-lib-dirs: /usr/local/lib
       include-dirs: /usr/local/include
       extra-libraries: blas lapack gfortran

    if os(windows)
        extra-libraries: blas lapack

    if os(linux)
        if arch(x86_64)
            cc-options: -fPIC


source-repository head
    type:     git
    location: https://github.com/albertoruiz/hmatrix