summaryrefslogtreecommitdiff
path: root/util/nvmutil/Makefile
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-12 13:42:12 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-12 13:42:12 +0000
commit478c994f345af332eb55bd8d89c5dc11c49d934b (patch)
tree2ae0001fdf2a5fb62638f96cc9638f1a9b9cead2 /util/nvmutil/Makefile
parentea4deb98b584da288afd405a0b4c66b24d698625 (diff)
util/nvmutil: add -m to install on Makefile
also support LDFLAGS Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/Makefile')
-rw-r--r--util/nvmutil/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/util/nvmutil/Makefile b/util/nvmutil/Makefile
index bef6f28c..64871c5e 100644
--- a/util/nvmutil/Makefile
+++ b/util/nvmutil/Makefile
@@ -1,9 +1,10 @@
# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2022,2026 Leah Rowe <leah@libreboot.org>
-# SPDX-FileCopyrightText: 2023 Riku Viitanen <riku.viitanen@protonmail.com>
+# Copyright (c) 2022,2026 Leah Rowe <leah@libreboot.org>
+# Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com>
CC?=cc
CFLAGS?=-Os -Wall -Wextra -Werror -pedantic -std=c90
+LDFLAGS?=
DESTDIR?=
PREFIX?=/usr/local
INSTALL?=install
@@ -13,11 +14,11 @@ PROG=nvmutil
all: $(PROG)
$(PROG): nvmutil.c
- $(CC) $(CFLAGS) nvmutil.c -o $(PROG)
+ $(CC) $(CFLAGS) $(LDFLAGS) nvmutil.c -o $(PROG)
install: $(PROG)
- mkdir -p $(DESTDIR)$(PREFIX)/bin/
- install $(PROG) $(DESTDIR)$(PREFIX)/bin/
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin/
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)