diff options
author | DaniAndTheWeb <57776841+DaniAndTheWeb@users.noreply.github.com> | 2023-05-05 23:57:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 23:57:14 +0200 |
commit | 173d0e6419e8f8f3c1f4f13201b777f4c60629f3 (patch) | |
tree | a61276332613289afb03223e868a2b9a2491ae55 /Makefile | |
parent | a3b85b28da84c67c3406807aef5e0457bcc4b00f (diff) |
makefile: automatic Arch Linux detection (#1332)
This commit is a port of a detection method used in koboldcpp's Makefile in order to automatically set the -lcblas option on Arch Linux
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -107,7 +107,11 @@ ifndef LLAMA_NO_ACCELERATE endif ifdef LLAMA_OPENBLAS CFLAGS += -DGGML_USE_OPENBLAS -I/usr/local/include/openblas - LDFLAGS += -lopenblas + ifneq ($(shell grep -e "Arch Linux" -e "ID_LIKE=arch" /etc/os-release 2>/dev/null),) + LDFLAGS += -lopenblas -lcblas + else + LDFLAGS += -lopenblas + endif endif ifdef LLAMA_CUBLAS CFLAGS += -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I$(CUDA_PATH)/targets/x86_64-linux/include |