How to get current relative directory of your Makefile?
I have a several Makefiles in app specific directories like this: /project1/apps/app_typeA/Makefile /project1/apps/app_typeB/Makefile /project1/apps/app_typeC/Makefile Each Makefile includes a .inc file in this path one level up: /project1/apps/app_rules.inc Inside app_rules.inc I'm setting the destination of where I want the binaries to be placed when built. I want all binaries to be in their respective app_type path: /project1/bin/app_typeA/ I tried using $(CURDIR) , like this: OUTPUT_PATH = /project1/bin/$(CURDIR) but instead I got the binaries buried in the entire path name like this: