Append to GNU make variables via command line

前端 未结 4 738
执念已碎
执念已碎 2020-12-07 20:14

I am using a GNU-make Makefile to build a C project with several targets (all, clean, and a few project specific targets). In the process of debugg

4条回答
  •  情歌与酒
    2020-12-07 20:29

    For the record, @Carl Norum's answer prepends the variable, from the command line perspective.

    I needed a way to actually append and came up with:

    override CFLAGS := -Wall $(CFLAGS)
    

提交回复
热议问题