Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
If a macro is being defined on the compiler, as:
cflag += -D name
How could I disable this definition?
如果要从中删除标志cflag,您可以:
cflag
用于$(subst)从 中剥离标志cflag,如下所示:
$(subst)
cflag := $(subst -D name,,$(cflag)
请注意,您也可以在cflag引用的位置进行替换。