Makefile: prefer distro cflags if specified
The compilation flags that are necessary for building and part of the developer's intentions belong in the `+=` section, but the base flags that distros like to override belong in a `?=` section, so that build systems using their own are respected. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
committed by
Geoffrey D. Bennett
parent
8ef011145c
commit
4cb1cd6e57
@@ -12,7 +12,8 @@ VERSION := $(shell \
|
||||
DEPDIR := .deps
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
|
||||
|
||||
CFLAGS += -Wall -Werror -ggdb -fno-omit-frame-pointer -O2 -D_FORTIFY_SOURCE=2
|
||||
CFLAGS ?= -ggdb -fno-omit-frame-pointer -O2
|
||||
CFLAGS += -Wall -Werror -D_FORTIFY_SOURCE=2
|
||||
CFLAGS += -DVERSION=\"$(VERSION)\"
|
||||
CFLAGS += -Wno-error=deprecated-declarations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user