Skip to content

Commit

Permalink
🧑‍💻 Split different archs back up in different targets
Browse files Browse the repository at this point in the history
  • Loading branch information
segersniels committed Apr 15, 2024
1 parent 73b12b7 commit 0248ddb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ BUILD_DIR=bin
TARGETS=darwin-arm64 darwin-amd64 linux-arm64 linux-amd64
LDFLAGS="-w -s -X main.AppVersion=$(VERSION) -X main.AppName=$(BINARY_NAME)"

build:
build: $(TARGETS)

darwin-arm64:
GOOS=darwin GOARCH=arm64 go build -o $(BUILD_DIR)/$(BINARY_NAME)-darwin-arm64 -ldflags $(LDFLAGS)

darwin-amd64:
GOOS=darwin GOARCH=amd64 go build -o $(BUILD_DIR)/$(BINARY_NAME)-darwin-amd64 -ldflags $(LDFLAGS)

linux-arm64:
GOOS=linux GOARCH=arm64 go build -o $(BUILD_DIR)/$(BINARY_NAME)-linux-arm64 -ldflags $(LDFLAGS)

linux-amd64:
GOOS=linux GOARCH=amd64 go build -o $(BUILD_DIR)/$(BINARY_NAME)-linux-amd64 -ldflags $(LDFLAGS)

clean:
Expand Down

0 comments on commit 0248ddb

Please sign in to comment.