I am implementing Non-Recursive Make, using John Graham Cummings example here. I would like to be able to specify specific includes or specific compilation flags, depending on which module I'm compiling.
For instance, say I have directories(and therefore separate Makefiles in) src/lib1 and src/executable. Say I would like to use -std=c++11 for the src/lib1 Makefile compilation, and (for some reason) -std=gnu99 for the src/executable Makefile.
Another example, say I need to include different paths for these directories.
What is the standard way to do this in non-recursive make?
What I have tried so far is something like...
$(MODULE_NAME)_CXXFLAGS:=-std=c++11
$(MODULE_NAME)_INCLUDES:=--I/.
But then the following printit just echos nothing.
printit:
@echo $($(MODULE_NAME)_INCLUDES)