Below is a variable I am using in a makefile.
copt = -mcpu=cortex-m3 -mthumb -g -c
I want to remove -mthumb and replace it with some other option. Is there any way I can strip the option and add few other options. I know how to add : Example - copt += -O3 but don't know how to remove the already existing options.
Thanks!
In your case:
A tad safer than
$(subst...)
to to use something that operates on whole words:sed
works well: