summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-09 06:34:57 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-09 06:38:18 +0000
commitc96254be8b42571f4a33cb2e0fb924e3a1d5da13 (patch)
treea7eed8365b1e241e0b3a64e91d0fb45335e39159
parent6a4ad6827307f9e96a33a74db775bbd6299ce23f (diff)
util/nvmutil: Makefile cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/Makefile28
1 files changed, 9 insertions, 19 deletions
diff --git a/util/nvmutil/Makefile b/util/nvmutil/Makefile
index 14e515e3..3d2be47e 100644
--- a/util/nvmutil/Makefile
+++ b/util/nvmutil/Makefile
@@ -8,31 +8,21 @@ DESTDIR?=
PREFIX?=/usr/local
INSTALL?=install
-# nvm is the old binary name,
-# but it was renamed to nvmutil
-# to avoid conflict with a certain
-# package manager by that name!
+BIN=nvmutil
-nvmutil: nvmutil.c
- rm -f nvm
- $(CC) $(CFLAGS) nvmutil.c -o nvmutil
+$(BIN): nvmutil.c
+ $(CC) $(CFLAGS) nvmutil.c -o $(BIN)
-install:
+install: $(BIN)
mkdir -p $(DESTDIR)$(PREFIX)/bin
- $(INSTALL) nvmutil $(DESTDIR)$(PREFIX)/bin/
-
-# do not delete *bin/nvm because
-# there is a package manager by
-# that name. this makefile now
-# treats nvmutil as the binary
+ $(INSTALL) $(BIN) $(DESTDIR)$(PREFIX)/bin/
uninstall:
- rm -f $(DESTDIR)$(PREFIX)/bin/nvmutil
-
-distclean:
- rm -f nvm nvmutil
+ rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
clean:
- rm -f nvm nvmutil
+ rm -f $(BIN)
+
+distclean: clean
.PHONY: install uninstall clean distclean