~leon_plickat/wlopm

a385b761bd0854c41264e6a543894368a2191d6f — Daniel Eklöf 1 year, 9 months ago 06b9e5a
Append to CFLAGS, instead of replacing them

The makefile already use (directly, or indirectly) CPPFLAGS and
LDFLAGS, so it makes sense to also use the user provided CFLAGS.

One example where this is necessary is if the user has set
CPPFLAGS=”-D_FORTIFY_SOURCE=2”, which, before this patch, results
in (even if the user has set CFLAGS=-O2):

/usr/include/features.h:397:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) -Werror=cpp]
1 files changed, 1 insertions(+), 1 deletions(-)

M Makefile
M Makefile => Makefile +1 -1
@@ 4,7 4,7 @@ PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man

CFLAGS=-Wall -Werror -Wextra -Wpedantic -Wno-unused-parameter -Wconversion -Wformat-security -Wformat -Wsign-conversion -Wfloat-conversion -Wunused-result
CFLAGS+=-Wall -Werror -Wextra -Wpedantic -Wno-unused-parameter -Wconversion -Wformat-security -Wformat -Wsign-conversion -Wfloat-conversion -Wunused-result
LIBS=-lwayland-client
OBJ=wlopm.o wlr-output-power-management-unstable-v1.o xdg-output-unstable-v1.o
GEN=wlr-output-power-management-unstable-v1.c wlr-output-power-management-unstable-v1.h xdg-output-unstable-v1.c xdg-output-unstable-v1.h