-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.conf
50 lines (37 loc) · 1.85 KB
/
default.conf
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
# macOS default configuration
ifeq ($(PLATFORM), darwin)
MAP=-map $(BUILD_DIR)/$(ENTRYPOINT).map
ifeq ($(TENSOR_BACKEND), $(TENSOR_BACKEND_GSL))
INCLUDE_FLAGS+= -I/opt/homebrew/include/
LDFLAGS+=-L/opt/homebrew/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lgsl -lgslcblas -macos_version_min 22.4 -lSystem
CFLAGS=-DDARWIN -D'TENSOR_BACKEND=$(TENSOR_BACKEND)'
else ifeq ($(TENSOR_BACKEND), $(TENSOR_BACKEND_BLAS))
INCLUDE_FLAGS+=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Headers/
LDFLAGS+=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -macos_version_min 22.4 -lSystem
FRAMEWORK_FLAGS+=-F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ -framework accelerate
CFLAGS+=-DDARWIN -D'TENSOR_BACKEND=$(TENSOR_BACKEND)'
else ifeq ($(TENSOR_BACKEND), $(TENSOR_BACKEND_CLAPACK))
LDFLAGS+=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -macos_version_min 22.4 -lSystem
CFLAGS+=-DDARWIN -D'TENSOR_BACKEND=$(TENSOR_BACKEND)'
else
$(error ERROR: TENSOR_BACKEND=$(TENSOR_BACKEND) not supported. Should be 0=clapack (default), 1=gsl, 2=blas)
endif
# linux default configuration
else ifeq ($(PLATFORM), linux)
CC=gcc
LD=gcc
ifeq ($(TENSOR_BACKEND), $(TENSOR_BACKEND_GSL))
CFLAGS+=-DLINUX -D'TENSOR_BACKEND=$(TENSOR_BACKEND)'
LDFLAGS+=-lgsl -lm
else ifeq ($(TENSOR_BACKEND), $(TENSOR_BACKEND_BLAS))
$(error ERROR: BLAS backend not supported on Linux yet)
else ifeq ($(TENSOR_BACKEND), $(TENSOR_BACKEND_CLAPACK))
INCLUDE_FLAGS+=-I$(INCLUDE_DIR)
CFLAGS+=-DLINUX -D'TENSOR_BACKEND=$(TENSOR_BACKEND)'
LDFLAGS+=-lm
else
$(error ERROR: TENSOR_BACKEND=$(TENSOR_BACKEND) not supported. Should be 0=clapack (default), 1=gsl, 2=blas)
endif
else
$(error ERROR: PLATFORM $(PLATFORM) not supported. Should be `darwin` or `linux`)
endif