mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
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>
This commit is contained in:
@@ -2,25 +2,25 @@
|
|||||||
# Copyright (c) 2022,2026 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2022,2026 Leah Rowe <leah@libreboot.org>
|
||||||
# Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com>
|
# Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com>
|
||||||
|
|
||||||
CC?=cc
|
CC = cc
|
||||||
HELLCC?=clang
|
HELLCC = clang
|
||||||
|
|
||||||
CFLAGS?=
|
CFLAGS=
|
||||||
LDFLAGS?=
|
LDFLAGS=
|
||||||
DESTDIR?=
|
DESTDIR=
|
||||||
PREFIX?=/usr/local
|
PREFIX = /usr/local
|
||||||
INSTALL?=install
|
INSTALL = install
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
LDIR?=
|
LDIR=
|
||||||
|
|
||||||
PORTABLE?=$(LDIR) $(CFLAGS)
|
PORTABLE = $(LDIR) $(CFLAGS)
|
||||||
WARN?=$(PORTABLE) -Wall -Wextra
|
WARN = $(PORTABLE) -Wall -Wextra
|
||||||
STRICT?=$(WARN) -std=c90 -pedantic -Werror
|
STRICT = $(WARN) -std=c90 -pedantic -Werror
|
||||||
HELLFLAGS?=$(STRICT) -Weverything
|
HELLFLAGS = $(STRICT) -Weverything
|
||||||
|
|
||||||
PROG=nvmutil
|
PROG = nvmutil
|
||||||
|
|
||||||
# source files
|
# source files
|
||||||
|
|
||||||
@@ -33,26 +33,26 @@ OBJS = $(SRCS:.c=.o)
|
|||||||
|
|
||||||
# default mode
|
# default mode
|
||||||
|
|
||||||
MODE?=portable
|
MODE = portable
|
||||||
|
|
||||||
# default mode, options
|
# default mode, options
|
||||||
|
|
||||||
CFLAGS_MODE=$(PORTABLE)
|
CFLAGS_MODE = $(PORTABLE)
|
||||||
CC_MODE=$(CC)
|
CC_MODE = $(CC)
|
||||||
|
|
||||||
# override modes (options)
|
# override modes (options)
|
||||||
|
|
||||||
ifeq ($(MODE),warn)
|
ifeq ($(MODE),warn)
|
||||||
CFLAGS_MODE=$(WARN)
|
CFLAGS_MODE = $(WARN)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MODE),strict)
|
ifeq ($(MODE),strict)
|
||||||
CFLAGS_MODE=$(STRICT)
|
CFLAGS_MODE = $(STRICT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MODE),hell)
|
ifeq ($(MODE),hell)
|
||||||
CFLAGS_MODE=$(HELLFLAGS)
|
CFLAGS_MODE = $(HELLFLAGS)
|
||||||
CC_MODE=$(HELLCC)
|
CC_MODE = $(HELLCC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# (rebuild on .h changes)
|
# (rebuild on .h changes)
|
||||||
|
|||||||
Reference in New Issue
Block a user