Skip to content

Commit

Permalink
Merge pull request #22 from NETWAYS/add_x86_target
Browse files Browse the repository at this point in the history
Add 386 (intel 32bit) target to Makefile
  • Loading branch information
RincewindsHat authored Feb 13, 2024
2 parents a04c412 + 1331676 commit 7b72a89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ builds:
- arm
- arm64
- amd64
- 386
- riscv64
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.PHONY: test coverage lint vet build build-all

TARGET_BASENAME := check_system_basics
TARGET_386 := $(TARGET_BASENAME)_386
TARGET_amd64 := $(TARGET_BASENAME)_amd64
TARGET_arm64 := $(TARGET_BASENAME)_arm64
TARGET_arm6 := $(TARGET_BASENAME)_arm6
Expand All @@ -23,7 +24,7 @@ GO_FILES = $(shell find . -iname '*.go')
build:
go build

build-all: $(TARGET_arm6) $(TARGET_amd64) $(TARGET_arm64) $(TARGET_riscv64)
build-all: $(TARGET_arm6) $(TARGET_amd64) $(TARGET_386) $(TARGET_arm64) $(TARGET_riscv64)

lint:
go fmt $(go list ./... | grep -v /vendor/)
Expand All @@ -38,6 +39,9 @@ coverage:
$(TARGET_amd64): $(GO_FILES)
CGO_ENABLED=0 go build $(GO_LINKEROPTS) -o $(TARGET_amd64)

$(TARGET_386): $(GO_FILES)
CGO_ENABLED=0 GOARCH=386 go build $(GO_LINKEROPTS) -o $(TARGET_386)

$(TARGET_arm64): $(GO_FILES)
CGO_ENABLED=0 GOARCH=arm64 go build $(GO_LINKEROPTS) -o $(TARGET_arm64)

Expand Down

0 comments on commit 7b72a89

Please sign in to comment.