Installing from source on an arm64 host downloaded amd64 dependencies and built amd64 plugins, failing once `plugin:install` ran the first binary. The `TARGETARCH` and `GOARCH` make variables now default to the host architecture and remain overridable, and debian packages are labelled with the architecture they were built for. Closes #9217.
25 lines
822 B
Makefile
25 lines
822 B
Makefile
TRIGGERS = triggers/report
|
|
BUILD = pagesize nginx-property report-subcommand triggers
|
|
PLUGIN_NAME = nginx-vhosts
|
|
|
|
clean-report-subcommand:
|
|
rm -rf report-subcommand
|
|
|
|
report-subcommand: clean-report-subcommand src/subcommands/subcommands.go
|
|
GOARCH=$(GOARCH) go build -mod=readonly -ldflags="-s -w" $(GO_ARGS) -o report-subcommand src/subcommands/subcommands.go
|
|
ln -sf ../report-subcommand subcommands/report
|
|
|
|
clean-pagesize:
|
|
rm -rf pagesize
|
|
|
|
pagesize: clean-pagesize **/**/pagesize.go
|
|
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o pagesize src/pagesize/pagesize.go
|
|
|
|
clean-nginx-property:
|
|
rm -rf nginx-property
|
|
|
|
nginx-property: clean-nginx-property **/**/nginx-property.go
|
|
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o nginx-property src/nginx-property/nginx-property.go
|
|
|
|
include ../../common.mk
|