# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Zygmunt Krynicki DESTDIR ?= prefix ?= /usr/local exec_prefix ?= $(prefix) bindir ?= $(exec_prefix)/bin snapdir ?= /snap STUBS = qemu-system-x86_64 qemu-system-aarch64 qemu-system-riscv64 qemu-system-s390x qemu-system-ppc64 .PHONY: all all:: .PHONY: clean clean:: .PHONY: install install:: $(STUBS) qemu-component-symlinks $(if $(DESTDIR),| $(DESTDIR)) install -m 755 -d $(DESTDIR)$(bindir) install -m 755 -t $(DESTDIR)$(bindir) $(STUBS) qemu-component-symlinks qemu-var-tmp ifneq (,$(DESTDIR)) $(DESTDIR): mkdir -p $(DESTDIR) endif .PHONY: check check: SHELLCHECK ?= $(or $(shell command -v shellcheck),$(error program shellcheck is required)) check: $(STUBS) qemu-component-symlinks qemu-var-tmp $(SHELLCHECK) $^ .PHONY: fmt fmt: SHFMT ?= $(or $(shell command -v shfmt),$(error program shfmt is required)) fmt: $(STUBS) qemu-component-symlinks qemu-var-tmp $(SHFMT) -w $^