Files
lbmk/util/nvmutil/Makefile
T
Leah Rowe 71ce22a938 nvmutil makefile: define WERROR but blank it
settting it to -Werror is wrong, should set
it not -Werror.

however, put the WERROR variable in the make
command. that way, i could test with

make WERROR=-Werror

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-03-26 06:59:41 +00:00

37 lines
718 B
Makefile

# SPDX-License-Identifier: MIT
# Copyright (c) 2022,2026 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com>
CC?=cc
CSTD?=-std=c90
WERROR?=
CWARN?=-Wall -Wextra -pedantic
COPT?=-Os
CFLAGS?=-I. $(COPT) $(CWARN) $(CSTD)
LDFLAGS?=
DESTDIR?=
PREFIX?=/usr/local
INSTALL?=install
PROG=nvmutil
all: $(PROG)
$(PROG): nvmutil.c
$(CC) $(CFLAGS) $(WERROR) $(LDFLAGS) nvmutil.c -o $(PROG)
install: $(PROG)
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)
chmod 755 $(DESTDIR)$(PREFIX)/bin/$(PROG)
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
clean:
rm -f $(PROG)
distclean: clean
.PHONY: all install uninstall clean distclean