I saw previous SO posts 1, 2 etc. I want to pass a preprocessor directive at compile time. With scons, I could do:
num_times = ARGUMENTS.get('c', 1)
env.Append(CCFLAGS = '-DNUM_TIMES=%d' % int(num_times))
I hope, it should also be possible using make. I want to issue
make c=4
or something like that. Can someone suggest a method. I am compiling a folder, which has subfolders with their own makefiles. Thanks in advance.