]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
change default CFLAGS settings into the default
authorMike Frysinger <vapier@gentoo.org>
Fri, 16 Dec 2016 00:10:28 +0000 (19:10 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 16 Dec 2016 00:10:32 +0000 (19:10 -0500)
The way compiler settings are appended to CFLAGS breaks custom flags
that people are using to build.  So if someone does:
$ export CFLAGS='-O0 -ggdb'
$ make
The build will force -O2 instead.

Shift these defaults into a default setting rather than always appending.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Makefile

index 33c71902479a18b19c2c589e292b0a39747d87a4..77945efaee9787064e840694442e594797d7929b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
-CFLAGS += -std=gnu99 -O2 -g -Wall -Werror
+CFLAGS ?= -O2 -g -Wall -Werror
+CFLAGS += -std=gnu99
 CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__
 NVME = nvme
 INSTALL ?= install