In the below example, I have stored the Makefile folder path to LOCAL_PKG_DIR
and then use LOCAL_PKG_DIR
variable in targets.
Makefile:
LOCAL_PKG_DIR := $(shell eval pwd)
.PHONY: print
print:
@echo $(LOCAL_PKG_DIR)
Terminal output:
$ make print
/home/amrit/folder