mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: add -m to install on Makefile
also support LDFLAGS Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user