chiark / gitweb /
Makefile: Support out-of-tree builds (badly).
authorMark Wooding <mdw@distorted.org.uk>
Sun, 5 May 2024 14:16:49 +0000 (15:16 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 5 May 2024 14:16:49 +0000 (15:16 +0100)
Makefile

index 077b638fa56e5c7e339f32d30e6de541d55bb14b..fa66c9faa91ff7006b5ec48b7ca889872faaa495 100644 (file)
--- 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                =