diff options
author | Leah Rowe <leah@libreboot.org> | 2025-01-03 02:03:44 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-01-03 02:03:44 +0000 |
commit | 982f257f58acc729cbb93c239b1fa37d9bef5834 (patch) | |
tree | ff4925b35bf986285ffb4f20d86e96f77ef6bcd8 /util/nvmutil | |
parent | 3f85ae5f853ce7c4b7fea92af112fad26e811ebf (diff) |
util/nvmutil: Proper DESTDIR/PREFIX handling
DESTDIR is the root directory where it goes, which
is normally an empty string; PREFIX is where the
bin directory is located, relative to DESTDIR
Default to /usr/local for PREFIX, not /usr, because
/usr/bin is for system utilities.
nvmutil is a local utility.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r-- | util/nvmutil/Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/util/nvmutil/Makefile b/util/nvmutil/Makefile index a1999d7e..317635f3 100644 --- a/util/nvmutil/Makefile +++ b/util/nvmutil/Makefile @@ -4,16 +4,17 @@ CC?=cc CFLAGS?=-Os -Wall -Wextra -Werror -pedantic -PREFIX?=/usr/bin +DESTDIR?= +PREFIX?=/usr/local nvm: nvmutil.c $(CC) $(CFLAGS) nvmutil.c -o nvm -install: nvm - install nvm $(PREFIX)/nvm +install: + install nvm $(DESTDIR)$(PREFIX)/bin/nvm uninstall: clean - rm -f $(PREFIX)/nvm + rm -f $(DESTDIR)$(PREFIX)/nvm distclean: rm -f nvm |