#!/usr/bin/make .DEFAULT_GOAL := list list: #Shows this list @echo The following options are available @grep '^[^#[:space:]].*:' Makefile | grep -v := | grep \# | sed -e "s/:[^|]*#/: /g" all: prepair amd64_build arm64_build arm_build #Build for all targets (excludes native) native: prepair native_build #Build for "Native" target amd64: prepair amd64_build #Build for amd64 target arm64: prepair arm64_build #Build for arm64 target arm: prepair arm_build #Build for arm target prepair: go get go install native_build: go build -o GoMqttIR_Native amd64_build: env GOARCH=amd64 go build -o GoMqttIR_amd64 arm64_build: env GOARCH=arm64 go build -o GoMqttIR_arm64 arm_build: env GOARCH=arm go build -o GoMqttIR_arm clean: # Run cleanup go clean rm -f GoMqttIR_Native GoMqttIR_amd64 GoMqttIR_arm64 GoMqttIR_arm