summaryrefslogtreecommitdiff
path: root/util/nvmutil/Makefile
blob: c6611075aadc37b80ba534d03140f01386a0b329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2022,2026 Leah Rowe <leah@libreboot.org>
# SPDX-FileCopyrightText: 2023 Riku Viitanen <riku.viitanen@protonmail.com>

CC?=cc
CFLAGS?=-Os -Wall -Wextra -Werror -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L
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!

nvm: nvmutil.c
	rm -f nvm
	$(CC) $(CFLAGS) nvmutil.c -o nvmutil

install:
	$(INSTALL) nvmutil $(DESTDIR)$(PREFIX)/bin/nvmutil

# do not delete *bin/nvm because
# there is a package manager by
# that name. this makefile now
# treats nvmutil as the binary

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/nvmutil

distclean:
	rm -f nvm nvmutil

clean:
	rm -f nvm nvmutil