Name:               hmatrix
Version:            0.16.1.3
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.
                    .
                    The package is organized as follows:
                    .
                    ["Numeric.LinearAlgebra.HMatrix"] Starting point and recommended import module for most applications.
                    .
                    ["Numeric.LinearAlgebra.Static"] Experimental alternative interface.
                    .
                    ["Numeric.LinearAlgebra.Devel"] Tools for extending the library.
                    .
                    (Other modules are exposed with hidden documentation for backwards compatibility.)
                    .
                    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

library

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

    hs-source-dirs:     src

    exposed-modules:    Data.Packed,
                        Data.Packed.Vector,
                        Data.Packed.Matrix,
                        Data.Packed.Foreign,
                        Data.Packed.ST,
                        Data.Packed.Development,

                        Numeric.LinearAlgebra
                        Numeric.LinearAlgebra.LAPACK
                        Numeric.LinearAlgebra.Algorithms
                        Numeric.Container
                        Numeric.LinearAlgebra.Util

                        Numeric.LinearAlgebra.Devel
                        Numeric.LinearAlgebra.Data
                        Numeric.LinearAlgebra.HMatrix
                        Numeric.LinearAlgebra.Static
                        


    other-modules:      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.Util.Convolution
                        Numeric.LinearAlgebra.Util.CG
                        Numeric.LinearAlgebra.Random
                        Numeric.Conversion
                        Numeric.Sparse
                        Numeric.LinearAlgebra.Static.Internal

    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