But in case there are any space characters in the terms you want to remove or change this would not work,
i.e. -D my_macro=const volatile would work, but -D const volatile=volatile is not possible.
Another possibility it to collect all -D macro definitions in a separate header file which is later included in every C file using the option -include. This is a good way to define several macros instead of having to list them all in the project separately.