Allow override Makefile CFLAGS by appending and not by overwriting

This commit is contained in:
Andrew Hlynskyi 2023-08-17 15:00:58 +03:00
parent eb3c2b378a
commit cbe805d82a

View file

@ -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