diff --git a/.gitignore b/.gitignore index d1a7f148..8ad9f228 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,6 @@ release/ .idea # Generated during build -backend-assets/ \ No newline at end of file +backend-assets/ + +/ggml-metal.metal \ No newline at end of file diff --git a/Makefile b/Makefile index 6106ef6e..cf763825 100644 --- a/Makefile +++ b/Makefile @@ -219,6 +219,9 @@ build: prepare ## Build the project $(info ${GREEN}I BUILD_TYPE: ${YELLOW}$(BUILD_TYPE)${RESET}) $(info ${GREEN}I GO_TAGS: ${YELLOW}$(GO_TAGS)${RESET}) CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=${C_INCLUDE_PATH} LIBRARY_PATH=${LIBRARY_PATH} $(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o $(BINARY_NAME) ./ +ifeq ($(BUILD_TYPE),metal) + cp go-llama/build/bin/ggml-metal.metal . +endif dist: build mkdir -p release