I want to define a C macro by passing it as the make argument, which is invoked from the command line.
Reference Information. I want the #define ENABLE_OPT 1 directive to be included in my C source code when I select a specific build option. Thus, I want this to be done using the make command line instead of modifying the source code or makefile.
How can this be achieved? I found that make -DENABLE_OPT=1 -f Makefile throws errors that are "E", "N", etc. Invalid arguments.
source share