Skip to content

Commit

Permalink
Makefile: Use new build approach for darwin amd64+arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Gogolok <[email protected]>
  • Loading branch information
gogolok committed Jan 16, 2025
1 parent 45b52d3 commit 93d5de7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 47 deletions.
29 changes: 1 addition & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GOFILES := $(shell $(GOCMD) run tools$/lister$/main.go)

all: test build package

GOOS_ARCHS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x
GOOS_ARCHS = linux/amd64 linux/arm64 linux/ppc64le linux/s390x darwin/amd64 darwin/arm64

build: build-linux-amd64 build-linux-arm64 build-linux-ppc64le build-linux-s390x

Expand Down Expand Up @@ -105,33 +105,6 @@ endef

$(foreach ga,$(GOOS_ARCHS),$(eval $(call build_targets,$(word 1, $(subst /, ,$(ga))),$(word 2, $(subst /, ,$(ga))))))

## DARWIN ARM64/AMD64
include lifecycle.mk
include launcher.mk
build-darwin-arm64: build-darwin-arm64-lifecycle build-darwin-arm64-launcher
build-darwin-arm64-lifecycle:
$(eval GOARCH := arm64)
$(eval TARGET := darwin-arm64)
$(eval OUT_DIR := $(BUILD_DIR)/$(TARGET)/lifecycle)
$(call build_lifecycle)
build-darwin-arm64-launcher:
$(eval GOARCH := arm64)
$(eval TARGET := darwin-arm64)
$(eval OUT_DIR := $(BUILD_DIR)/$(TARGET)/lifecycle)
$(call build_launcher)

build-darwin-amd64: build-darwin-amd64-lifecycle build-darwin-amd64-launcher
build-darwin-amd64-lifecycle:
$(eval GOARCH := amd64)
$(eval TARGET := darwin-amd64)
$(eval OUT_DIR := $(BUILD_DIR)/$(TARGET)/lifecycle)
$(call build_lifecycle)
build-darwin-amd64-launcher:
$(eval GOARCH := amd64)
$(eval TARGET := darwin-amd64)
$(eval OUT_DIR := $(BUILD_DIR)/$(TARGET)/lifecycle)
$(call build_launcher)

generate-sbom: run-syft-linux-amd64 run-syft-linux-arm64 run-syft-linux-ppc64le run-syft-linux-s390x

run-syft-linux-amd64: install-syft
Expand Down
6 changes: 0 additions & 6 deletions launcher.mk

This file was deleted.

13 changes: 0 additions & 13 deletions lifecycle.mk

This file was deleted.

0 comments on commit 93d5de7

Please sign in to comment.