Makefile: How to determine directory where Makefile resides
detect_makefile_dir.mk
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
Check out similar posts by category:
Build Systems
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow