-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.inc
50 lines (36 loc) · 1.37 KB
/
make.inc
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
# BBLAS example make.inc, using Intel MKL and gcc
#
# BBLAS is a software package provided by:
# University of Tennessee, US,
# University of Manchester, UK.
# --------------------
# programs
CC = gcc
AR = ar
RANLIB = ranlib
# --------------------
# flags
# Use -fPIC to make shared (.so) and static (.a) libraries;
# can be commented out if making only static libraries.
FPIC = -fPIC
CFLAGS = $(FPIC) -O3 -std=c99 -Wall -pedantic -Wshadow -Wno-unused-function
LDFLAGS = $(FPIC)
# one of: aix bsd c89 freebsd generic linux macosx mingw posix solaris
# usually generic is fine
lua_platform = macosx
# --------------------
# libraries
# ----- with MKL
# This assumes $MKLROOT is set in your environment.
# Add these to your .cshrc or .bashrc, adjusting for where MKL is installed:
# in .cshrc: source /opt/intel/bin/compilervars.csh intel64
# in .bashrc: source /opt/intel/bin/compilervars.sh intel64
# Currently, MKL on MacOS has only Intel threads, which may not work with gcc,
# so use sequential.
CFLAGS += -DHAVE_MKL
LIBS = -L$(MKLROOT)/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm
INC = -I$(MKLROOT)/include
# ----- with MacOS Accelerate (Veclib)
# do not use Netlib LAPACK with Accelerate; zdotc crashes.
#LIBS = -L$(LAPACKDIR) -llapacke -framework Accelerate
#INC = -I$(LAPACKDIR)/LAPACKE/include -I$(CBLASDIR)