# IT4Innovation 2017
#
# For Salomon ONLY!

easyblock = 'Binary'

name = 'libsmm'
version = '2015-11-10'

homepage = 'https://www.cp2k.org/'
description = 'Library for small matrix multiplies.'

toolchain = SYSTEM

source_urls = ['https://www.cp2k.org/static/downloads/libsmm/']
sources = ['libsmm_dnn_haswell-2015-11-10.a']

postinstallcmds = [
    "mkdir %(installdir)s/lib",
    "mv %(installdir)s/libsmm_dnn_haswell-2015-11-10.a %(installdir)s/lib/libsmm_dnn.a"
]

sanity_check_paths = {
    'files': ['lib/libsmm_dnn.a'],
    'dirs': [],
}

modextravars = {
    'LIBSMM_LDFLAGS': '-L\'%(installdir)s/lib\' -Wl,-rpath=\'%(installdir)s/lib\'',
    'LIBSMM_LIBS': '-lsmm_dnn',
}


moduleclass = 'math'
