From 94631659798dcb1dcef9b6256e35a07aa830ff28 Mon Sep 17 00:00:00 2001 From: David Simansky Date: Wed, 27 Nov 2024 15:47:04 +0100 Subject: [PATCH] Add platform target to Makefile (#536) --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index aeb636ea3..ef7c8b32f 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -CGO_ENABLED=0 -GOOS=linux +CGO_ENABLED=1 +GOOS ?= +GOARCH ?= TEST_IMAGES=./test/test_images/helloworld knative.dev/serving/test/test_images/grpc-ping knative.dev/serving/test/test_images/multicontainer/servingcontainer knative.dev/serving/test/test_images/multicontainer/sidecarcontainer TEST= TEST_IMAGE_TAG ?= latest @@ -28,6 +29,10 @@ build: GOFLAGS='' ./hack/build.sh -f .PHONY: build +build-with-platform: + ./hack/build.sh -p $(GOOS) $(GOARCH) +.PHONY: build-with-platform + build-cross: GOFLAGS='' ./hack/build.sh -x .PHONY: build-cross