From: Andy Lutomirski Date: Mon, 15 Apr 2019 17:48:05 +0000 (-0700) Subject: Fix passing CFLAGS on the make command line. X-Git-Tag: v1.9~84^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4573adbe32f8a83b957ff04368c916073052a0b4;p=users%2Fsagi%2Fnvme-cli.git Fix passing CFLAGS on the make command line. Commit 254bcd6b2343 ("Fix CFLAGS parameter") only fixed the problem if the variable came from the environment, not if it came from the command line. Fix it using 'override'. See the GNU Make manual, section 6.7 ("Overriding variables") for details. Signed-off-by: Andy Lutomirski --- diff --git a/Makefile b/Makefile index 3a4e2239..25c65ab0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CFLAGS ?= -O2 -g -Wall -Werror -CFLAGS += -std=gnu99 -I. -CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__ +override CFLAGS += -std=gnu99 -I. +override CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__ LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?) NVME = nvme INSTALL ?= install