From 1a1d8b073a1d770c8de4f8eb274387b209b32782 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Nov 2013 11:39:21 +0000 Subject: Add a Makefile for bsdiff --- mk/programs.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mk') diff --git a/mk/programs.mk b/mk/programs.mk index e26e9af7a394..48f95c60c981 100644 --- a/mk/programs.mk +++ b/mk/programs.mk @@ -13,7 +13,8 @@ programs_list := # # - $(1)_LDFLAGS: additional linker flags. # -# - bindir: the directory where the program will be installed. +# - $(1)_INSTALL_DIR: the directory where the program will be +# installed; defaults to $(bindir). define build-program = _d := $$($(1)_DIR) _srcs := $$(foreach src, $$($(1)_SOURCES), $$(_d)/$$(src)) @@ -24,7 +25,7 @@ define build-program = $$($(1)_PATH): $$($(1)_OBJS) $$(_libs) $(QUIET) $(CXX) -o $$@ $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE)) - $(1)_INSTALL_DIR := $$(bindir) + $(1)_INSTALL_DIR ?= $$(bindir) $(1)_INSTALL_PATH := $$($(1)_INSTALL_DIR)/$(1) $$(eval $$(call create-dir,$$($(1)_INSTALL_DIR))) -- cgit 1.4.1