Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
vernak2539 committed Sep 26, 2022
1 parent cd063ba commit bbb4df6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Expand Up @@ -12,7 +12,9 @@ build_arm7:
.PHONY: build_arm6
build_arm6:
env CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 GOOS=linux GOARM=6 GOARCH=arm go build -o build/dht_sensor_exporter-$(VERSION)-linux-armv6 ./cmd/main.go


# this will correlate to to the host machine used in the github action. at current, it's ubuntu-latest, which will produce an amd64 compatible file
# Example - ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f62edcff60f1a79f497b1fc26afe9237b257a084, for GNU/Linux 3.2.0, with debug_info, not stripped
.PHONY: build_host
build_host:
go build -o build/dht_sensor_exporter-$(VERSION)-linux-ubuntu-host ./cmd/main.go
go build -o build/dht_sensor_exporter-$(VERSION)-linux-amd64 ./cmd/main.go

0 comments on commit bbb4df6

Please sign in to comment.