File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,11 +65,17 @@ DMR_LDFLAGS := -s -w \
6565 -X main.Version=$(DMR_VERSION ) \
6666 -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(DMR_VERSION )
6767
68+ # Add .exe on windows, nothing elsewhere
69+ DMR_EXE := dmr
70+ ifeq ($(OS ) ,Windows_NT)
71+ DMR_EXE := dmr.exe
72+ endif
73+
6874# build-dmr builds a native dmr binary. dmr has no cgo dependencies, so
6975# CGO_ENABLED=0 keeps the binary statically linked and trivial to
7076# cross-compile (see build-dmr-cross).
7177build-dmr :
72- CGO_ENABLED=0 go build -ldflags=" $( DMR_LDFLAGS) " -o dmr ./cmd/dmr
78+ CGO_ENABLED=0 go build -ldflags=" $( DMR_LDFLAGS) " -o $( DMR_EXE ) ./cmd/dmr
7379
7480# build-dmr-cross builds standalone dmr binaries for every platform we
7581# publish packages for (see packaging/), into dist/dmr/<os>-<arch>/dmr.
@@ -108,7 +114,7 @@ run: build
108114# Clean build artifacts
109115clean :
110116 rm -f $(APP_NAME )
111- rm -f dmr
117+ rm -f $( DMR_EXE )
112118 rm -f model-runner.sock
113119
114120# Run tests
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ dmr rm ai/gemma3 # remove a local model
3737## Building
3838
3939```
40- make build-dmr # native build, output ./dmr
40+ make build-dmr # native build, output ./dmr (or dmr.exe on Windows)
4141make build-dmr-cross # cross-compile every published target into dist/dmr/<os>-<arch>/
4242```
4343
You can’t perform that action at this time.
0 commit comments