diff --git a/.gitignore b/.gitignore index 34010f85..ef88e17e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build dist __pycache__ ollama +ggml-metal.metal diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..a4482089 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +default: ollama + +.PHONY: llama +llama: + cmake -S llama -B llama/build -DLLAMA_METAL=on + cmake --build llama/build + +.PHONY: ollama +ollama: llama + go build . + +.PHONY: app +app: ollama + npm run --prefix app package + +clean: + go clean + rm -rf llama/build diff --git a/llama/llama.go b/llama/llama.go index f5bddbdc..c9c9c8fd 100644 --- a/llama/llama.go +++ b/llama/llama.go @@ -20,8 +20,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -//go:generate cmake -S . -B build -//go:generate cmake --build build package llama // #cgo LDFLAGS: -Lbuild -lbinding -lllama -lm -lggml_static -lstdc++ diff --git a/llama/llama_metal.go b/llama/llama_metal.go index 111cc5ff..3758ef9b 100644 --- a/llama/llama_metal.go +++ b/llama/llama_metal.go @@ -1,5 +1,2 @@ //go:build metal package llama - -//go:generate cmake -S . -B build --fresh -DLLAMA_METAL=on -//go:generate cmake --build build