aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonoclast Laboratories <brigham@ionoclast.com>2023-05-05 08:18:21 -0400
committerGitHub <noreply@github.com>2023-05-05 14:18:21 +0200
commit2d13786e91ec9fd28ddf737053822042a824da78 (patch)
treead99c8c43c425e7d30c1dd1790be1df134933826
parenta90e96b266873ebb5e947c9864b12193bdada0fb (diff)
Fix for OpenCL / clbast builds on macOS. (#1329)
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 94acefd..260b248 100644
--- a/Makefile
+++ b/Makefile
@@ -121,7 +121,12 @@ ggml-cuda.o: ggml-cuda.cu ggml-cuda.h
endif
ifdef LLAMA_CLBLAST
CFLAGS += -DGGML_USE_CLBLAST
- LDFLAGS += -lclblast -lOpenCL
+ # Mac provides OpenCL as a framework
+ ifeq ($(UNAME_S),Darwin)
+ LDFLAGS += -lclblast -framework OpenCL
+ else
+ LDFLAGS += -lclblast -lOpenCL
+ endif
OBJS += ggml-opencl.o
ggml-opencl.o: ggml-opencl.c ggml-opencl.h
$(CC) $(CFLAGS) -c $< -o $@