diff --git a/BUILDING.md b/BUILDING.md index 1995d318e..910be96c2 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -11,25 +11,33 @@ All code under the `pkg/` directory should be thoroughly tested. ## Building binary -Use `make test` to build all platofrm binaries to the `bin/` directory. +Use `make build` to build all platofrm binaries to the `bin/` directory. Mac: -``` +```bash # builds to bin/darwin/amd64/oras make build-mac ``` Linux: +```bash +# builds to bin/linux/amd64/oras +make build-linux ``` + +Linux ARM64: + +```bash # builds to bin/linux/amd64/oras make build-linux ``` + Windows: -``` +```bash # builds to bin/windows/amd64/oras.exe make build-windows ``` diff --git a/Makefile b/Makefile index 0cc0583f0..42558d957 100644 --- a/Makefile +++ b/Makefile @@ -28,13 +28,18 @@ clean: git status --ignored --short | grep '^!! ' | sed 's/!! //' | xargs rm -rf .PHONY: build -build: build-linux build-mac build-windows +build: build-linux build-linux-arm64 build-mac build-windows .PHONY: build-linux build-linux: GOARCH=amd64 CGO_ENABLED=0 GOOS=linux go build -v --ldflags="$(LDFLAGS)" \ -o bin/linux/amd64/$(CLI_EXE) $(CLI_PKG) +.PHONY: build-linux-arm64 +build-linux-arm64: + GOARCH=arm64 CGO_ENABLED=0 GOOS=linux go build -v --ldflags="$(LDFLAGS)" \ + -o bin/linux/arm64/$(CLI_EXE) $(CLI_PKG) + .PHONY: build-mac build-mac: GOARCH=amd64 CGO_ENABLED=0 GOOS=darwin go build -v --ldflags="$(LDFLAGS)" \