diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-18 13:40:20 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-18 13:40:20 +0000 |
| commit | bd7be7bb7ef208e9cc8f9f6d70a0a34f96a37cc6 (patch) | |
| tree | 713f7398fd007d5d8ecd49efe06214f4ea25f738 | |
| parent | 27371af4bc6d3b1dfec6a498585769ccdb3b15f6 (diff) | |
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 <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/Makefile | 40 |
1 files changed, 20 insertions, 20 deletions
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 <leah@libreboot.org> # Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com> -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) |
