mirror of
https://github.com/ollama/ollama.git
synced 2025-03-21 07:12:43 +01:00
The final implementation of #7499 removed dynamic vector requirements in favor of a simpler filename based model, and this was left over logic that is no longer needed.
20 lines
758 B
Makefile
20 lines
758 B
Makefile
# Makefile for building top-level ollama binary
|
|
|
|
include make/common-defs.make
|
|
|
|
exe: $(OLLAMA_EXE)
|
|
dist_exe dist_ollama: $(DIST_OLLAMA_EXE)
|
|
|
|
GO_DEPS=$(foreach dir,$(shell go list -deps -f '{{.Dir}}' . ),$(wildcard $(dir)/*.go))
|
|
CPU_GOFLAGS="-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$(VERSION)\" $(EXTRA_GOLDFLAGS) $(TARGET_LDFLAGS)"
|
|
|
|
$(OLLAMA_EXE) $(DIST_OLLAMA_EXE): TARGET_CPU_FLAGS=$(CUSTOM_CPU_FLAGS)
|
|
$(OLLAMA_EXE) $(DIST_OLLAMA_EXE): $(COMMON_SRCS) $(COMMON_HDRS) $(GO_DEPS)
|
|
GOARCH=$(ARCH) go build -buildmode=pie $(CPU_GOFLAGS) -trimpath $(if $(CUSTOM_CPU_FLAGS),-tags $(subst $(space),$(comma),$(CUSTOM_CPU_FLAGS))) -o $@ .
|
|
|
|
.PHONY: ollama dist_ollama exe dist_exe
|
|
|
|
# Handy debugging for make variables
|
|
print-%:
|
|
@echo '$*=$($*)'
|