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: … Read more

How to print out a variable in makefile

In my makefile, I have a variable ‘NDK_PROJECT_PATH’, my question is how can I print it out when it compiles? I read Make file echo displaying “$PATH” string and I tried: @echo $(NDK_PROJECT_PATH) @echo $(value NDK_PROJECT_PATH) Both gives me “build-local.mk:102: *** missing separator. Stop.” Any one knows why it is not working for me? 15 … Read more