use Makefile
for dependency building instead of go generate
This commit is contained in:
parent
e423421f03
commit
9fe018675f
4 changed files with 19 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ build
|
|||
dist
|
||||
__pycache__
|
||||
ollama
|
||||
ggml-metal.metal
|
||||
|
|
18
Makefile
Normal file
18
Makefile
Normal file
|
@ -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
|
|
@ -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++
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
//go:build metal
|
||||
package llama
|
||||
|
||||
//go:generate cmake -S . -B build --fresh -DLLAMA_METAL=on
|
||||
//go:generate cmake --build build
|
||||
|
|
Loading…
Reference in a new issue