From cbe805d82a7355ee4b7506dc8510abe56c7eb4b5 Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Thu, 17 Aug 2023 15:00:58 +0300 Subject: [PATCH] Allow override Makefile CFLAGS by appending and not by overwriting --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 59554e1d..57f19da3 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,8 @@ endif OBJ := $(SRC:.c=.o) # define default flags, and override to append mandatory flags -CFLAGS ?= -O3 -Wall -Wextra -Werror -Wshadow -override CFLAGS += -std=gnu99 -fPIC -Ilib/src -Ilib/include +override CFLAGS := -O3 -std=gnu99 -fPIC -Wall -Wextra -Werror -Wshadow $(CFLAGS) +override CFLAGS += -Ilib/src -Ilib/include # ABI versioning SONAME_MAJOR := 0