From 73794aaf2e965c970dd49fa510e3c3c3957f9812 Mon Sep 17 00:00:00 2001 From: Ivan Tatarinov Date: Mon, 26 Apr 2021 20:28:06 +0300 Subject: [PATCH] sdk: updated `src/tools/Makefile` and `src/zx7b/Makefile` + added `INSTALL` and `INSTALL_PROGRAM` variables --- sdk/src/tools/Makefile | 10 +++++----- sdk/src/zx7b/Makefile | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sdk/src/tools/Makefile b/sdk/src/tools/Makefile index 14ce252..e616bba 100644 --- a/sdk/src/tools/Makefile +++ b/sdk/src/tools/Makefile @@ -15,13 +15,10 @@ # make distclean # # where: -# is one of: mingw32, mingw64. +# - see included `common.mk'. # is one of values for `BINS' variable prefixed with "build/" # (see target `all' below). # is a prefix directory to install files into. -# -# Notes: -# `BUILD', `prefix' variables may be set in user's environment. include ../../common.mk @@ -30,6 +27,9 @@ prefix ?= /usr/local exec_prefix ?= $(prefix) bindir ?= $(exec_prefix)/bin +INSTALL ?= install +INSTALL_PROGRAM ?= $(INSTALL) + BINS:=\ bin2hex$(EXESUFFIX)\ fcut$(EXESUFFIX)\ @@ -56,7 +56,7 @@ install: $(foreach t,$(BINS),$(DESTDIR)$(bindir)/$(t)) # $1 = target define install_bin_rule = $$(DESTDIR)$$(bindir)/$1: build/$1 | $$(DESTDIR)$$(bindir) - cp $$< $$@ + $$(INSTALL_PROGRAM) $$< $$@ endef $(foreach t,$(BINS),$(eval $(call install_bin_rule,$(t)))) diff --git a/sdk/src/zx7b/Makefile b/sdk/src/zx7b/Makefile index 1a59830..3fdcdd8 100644 --- a/sdk/src/zx7b/Makefile +++ b/sdk/src/zx7b/Makefile @@ -15,13 +15,10 @@ # make distclean # # where: -# is one of: mingw32, mingw64. +# - see included `common.mk'. # is one of values for `BINS' variable prefixed with "build/" # (see target `all' below). # is a prefix directory to install files into. -# -# Notes: -# `BUILD', `prefix' variables may be set in user's environment. include ../../common.mk @@ -30,6 +27,9 @@ prefix ?= /usr/local exec_prefix ?= $(prefix) bindir ?= $(exec_prefix)/bin +INSTALL ?= install +INSTALL_PROGRAM ?= $(INSTALL) + BINS = zx7b$(EXESUFFIX) .PHONY: all @@ -46,7 +46,7 @@ build/zx7b$(EXESUFFIX): $(srcdir)/zx7b.c Makefile | build install: $(foreach t,$(BINS),$(DESTDIR)$(bindir)/$(t)) $(DESTDIR)$(bindir)/zx7b$(EXESUFFIX): build/zx7b$(EXESUFFIX) | $(DESTDIR)$(bindir) - cp $< $@ + $(INSTALL_PROGRAM) $< $@ .PHONY: uninstall uninstall: