-
Notifications
You must be signed in to change notification settings - Fork 90
/
Makefile.external_blas
89 lines (78 loc) · 6 KB
/
Makefile.external_blas
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
###################################################################################################
# #
# This file is part of BLASFEO. #
# #
# BLASFEO -- BLAS for embedded optimization. #
# Copyright (C) 2019 by Gianluca Frison. #
# Developed at IMTEK (University of Freiburg) under the supervision of Moritz Diehl. #
# All rights reserved. #
# #
# The 2-Clause BSD License #
# #
# Redistribution and use in source and binary forms, with or without #
# modification, are permitted provided that the following conditions are met: #
# #
# 1. Redistributions of source code must retain the above copyright notice, this #
# list of conditions and the following disclaimer. #
# 2. Redistributions in binary form must reproduce the above copyright notice, #
# this list of conditions and the following disclaimer in the documentation #
# and/or other materials provided with the distribution. #
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED #
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE #
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR #
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES #
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; #
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND #
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT #
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS #
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #
# #
# Author: Gianluca Frison, gianluca.frison (at) imtek.uni-freiburg.de #
# #
###################################################################################################
INCLUDE_EXTERNAL_BLAS =
LIBS_EXTERNAL_BLAS =
SHARED_LIBS_EXTERNAL_BLAS = # TODO
ifeq ($(EXTERNAL_BLAS), SYSTEM)
INCLUDE_EXTERNAL_BLAS +=
LIBS_EXTERNAL_BLAS += -lblas -llapack -lm
endif
ifeq ($(EXTERNAL_BLAS), OPENBLAS)
INCLUDE_EXTERNAL_BLAS += -I/opt/openblas/include
LIBS_EXTERNAL_BLAS += /opt/openblas/lib/libopenblas.a -pthread -lgfortran -lm
endif
ifeq ($(EXTERNAL_BLAS), BLIS)
INCLUDE_EXTERNAL_BLAS += -I/opt/blis/include/blis
LIBS_EXTERNAL_BLAS += /opt/netlib/liblapack.a /opt/blis/lib/libblis.a -lgfortran -lm -pthread
endif
ifeq ($(EXTERNAL_BLAS), NETLIB)
INCLUDE_EXTERNAL_BLAS +=
LIBS_EXTERNAL_BLAS += /opt/netlib/liblapack.a /opt/netlib/libblas.a -lgfortran -lm
endif
ifeq ($(EXTERNAL_BLAS), MKL)
#INCLUDE_EXTERNAL_BLAS += -I/opt/intel/mkl/include
#LIBS_EXTERNAL_BLAS += -Wl,--start-group /opt/intel/mkl/lib/intel64/libmkl_gf_lp64.a /opt/intel/mkl/lib/intel64/libmkl_core.a /opt/intel/mkl/lib/intel64/libmkl_sequential.a -Wl,--end-group -ldl -lpthread -lm
#INCLUDE_EXTERNAL_BLAS += -I/opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/include
#LIBS_EXTERNAL_BLAS += -Wl,--start-group /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64/libmkl_gf_lp64.a /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64/libmkl_core.a /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64/libmkl_sequential.a -Wl,--end-group -ldl -lpthread -lm
#INCLUDE_EXTERNAL_BLAS += -I/opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/include
#LIBS_EXTERNAL_BLAS += -Wl,--start-group /opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/lib/intel64/libmkl_gf_lp64.a /opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/lib/intel64/libmkl_core.a /opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/lib/intel64/libmkl_sequential.a -Wl,--end-group -ldl -lpthread -lm
INCLUDE_EXTERNAL_BLAS += -I ~/intel/oneapi/mkl/latest/include
LIBS_EXTERNAL_BLAS += -Wl,--start-group ~/intel/oneapi/mkl/latest/lib/intel64/libmkl_gf_lp64.a ~/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.a ~/intel/oneapi/mkl/latest/lib/intel64/libmkl_sequential.a -Wl,--end-group -ldl -lpthread -lm
endif
ifeq ($(EXTERNAL_BLAS), ATLAS)
INCLUDE_EXTERNAL_BLAS +=
LIBS_EXTERNAL_BLAS += /opt/atlas/lib/liblapack.a /opt/atlas/lib/libcblas.a /opt/atlas/lib/libf77blas.a /opt/atlas/lib/libatlas.a -lgfortran -lm
endif
ifeq ($(EXTERNAL_BLAS), ARMPL)
INCLUDE_EXTERNAL_BLAS += -I/opt/arm/armpl_20.3_gcc-7.1/include
LIBS_EXTERNAL_BLAS += /opt/arm/armpl_20.3_gcc-7.1/lib/libarmpl.a #-pthread -lgfortran -lm
endif
ifeq ($(EXTERNAL_BLAS), ACCELERATE)
INCLUDE_EXTERNAL_BLAS += #-I/opt/arm/armpl_20.3_gcc-7.1/include
LIBS_EXTERNAL_BLAS += -framework accelerate
endif
#ifneq ($(NUM_THREAD), 1)
#LIBS_EXTERNAL_BLAS += -pthread
#endif