Nick writes: > Quoth Yuri: > > You should also change your config.mk files to allow external optimization > > and other flags. For example: > > > > > CFLAGS = -std=c99 -Wall -pedantic -O2 > > > > should be changed to > > > > > CFLAGS ?= -O2 > > > > > CFLAGS += -std=c99 -Wall -pedantic -O2 > > > > This way you can allow externally supplied optimization flags while still > > being able to add your own flags. Same with CPPFLAGS and LDFLAGS. > > I believe the reason suckless projects stick to = rather than += or > ?= is that they aren't POSIX / OSI standard. I don't think there's a > compelling reason to switch to your syntax, as distribution builders > or whoever can still easily see what the CFLAGS were and add to them > if they want or need to.
Variables set with = can easily be overridden by packagers simply by passing them as arguments to make(1). That's fine for warnings and optimization flags since changing them doesn't hurt anything. If -std=c99 is necessary for the build, it shouldn't be in CFLAGS at all for that reason.
