From: Mark Wooding Date: Sun, 5 May 2024 14:16:49 +0000 (+0100) Subject: Makefile: Support out-of-tree builds (badly). X-Git-Tag: 1.0.0~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/distorted-dkim/commitdiff_plain/ebea04c024b65369f16f138c34ee405c3bcc811e Makefile: Support out-of-tree builds (badly). --- diff --git a/Makefile b/Makefile index 077b638..fa66c9f 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ ###-------------------------------------------------------------------------- ### User-serviceable parts. +## Source directory. +srcdir := $(dir $(lastword $(MAKEFILE_LIST))) + ## Installation directories. prefix = /usr/local exec_prefix = ${prefix} @@ -26,6 +29,8 @@ clean:: force: .PHONY: force +VPATH = $(srcdir) + ## Layout. INSTDIRS =