From bd7be7bb7ef208e9cc8f9f6d70a0a34f96a37cc6 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 18 Mar 2026 13:40:20 +0000 Subject: nvmutil makefile: use portable assignments question mark respects environmental variables but isn't portable you can just pass as argument on the command line question mark is more useful for build systems, but i'm not really bothered. the old way works. Signed-off-by: Leah Rowe --- util/nvmutil/Makefile | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'util/nvmutil') diff --git a/util/nvmutil/Makefile b/util/nvmutil/Makefile index 6b4ee3c5..31d902ae 100644 --- a/util/nvmutil/Makefile +++ b/util/nvmutil/Makefile @@ -2,25 +2,25 @@ # Copyright (c) 2022,2026 Leah Rowe # Copyright (c) 2023 Riku Viitanen -CC?=cc -HELLCC?=clang +CC = cc +HELLCC = clang -CFLAGS?= -LDFLAGS?= -DESTDIR?= -PREFIX?=/usr/local -INSTALL?=install +CFLAGS= +LDFLAGS= +DESTDIR= +PREFIX = /usr/local +INSTALL = install .SUFFIXES: .c .o -LDIR?= +LDIR= -PORTABLE?=$(LDIR) $(CFLAGS) -WARN?=$(PORTABLE) -Wall -Wextra -STRICT?=$(WARN) -std=c90 -pedantic -Werror -HELLFLAGS?=$(STRICT) -Weverything +PORTABLE = $(LDIR) $(CFLAGS) +WARN = $(PORTABLE) -Wall -Wextra +STRICT = $(WARN) -std=c90 -pedantic -Werror +HELLFLAGS = $(STRICT) -Weverything -PROG=nvmutil +PROG = nvmutil # source files @@ -33,26 +33,26 @@ OBJS = $(SRCS:.c=.o) # default mode -MODE?=portable +MODE = portable # default mode, options -CFLAGS_MODE=$(PORTABLE) -CC_MODE=$(CC) +CFLAGS_MODE = $(PORTABLE) +CC_MODE = $(CC) # override modes (options) ifeq ($(MODE),warn) -CFLAGS_MODE=$(WARN) +CFLAGS_MODE = $(WARN) endif ifeq ($(MODE),strict) -CFLAGS_MODE=$(STRICT) +CFLAGS_MODE = $(STRICT) endif ifeq ($(MODE),hell) -CFLAGS_MODE=$(HELLFLAGS) -CC_MODE=$(HELLCC) +CFLAGS_MODE = $(HELLFLAGS) +CC_MODE = $(HELLCC) endif # (rebuild on .h changes) -- cgit v1.2.1