Resolve make: *** No rule to make target ggml-metal.m', needed by ggml-metal.o'. Stop error on macOS Metal (#957)

This commit is contained in:
bebopkim 2024-06-30 17:05:03 +09:00 committed by GitHub
parent b1f9c97a0b
commit 7499a6bd4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -271,7 +271,7 @@ ifdef LLAMA_METAL
LDFLAGS += -framework Foundation -framework Metal -framework MetalKit -framework MetalPerformanceShaders
OBJS += ggml-metal.o
ggml-metal.o: ggml-metal.m ggml-metal.h
ggml-metal.o: ggml/src/ggml-metal.m ggml/include/ggml-metal.h
@echo "== Preparing merged Metal file =="
@sed -e '/#include "ggml-common.h"/r ggml/src/ggml-common.h' -e '/#include "ggml-common.h"/d' < ggml/src/ggml-metal.metal > ggml/src/ggml-metal-merged.metal
$(CC) $(CFLAGS) -c $< -o $@