I have the following C code:
file.c:
int i=VAR;
which is compiled using a makefile:
CFLAGS =+ -DVAR=10
but instead of compiling the file using just "make" and relying on the variable in the makefile, I would like to change the variable each time I compile the program using the command line.
For example, I expect the following command line to work:
make CFLAGS=-DVAR=10