Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 lines
789 B
Makefile
31 lines
789 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for bootconfig command
|
|
include ../scripts/Makefile.include
|
|
|
|
bindir ?= /usr/bin
|
|
|
|
ifeq ($(srctree),)
|
|
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
|
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|
endif
|
|
|
|
LIBSRC = $(srctree)/lib/bootconfig.c $(srctree)/include/linux/bootconfig.h
|
|
override CFLAGS += -Wall -g -I$(CURDIR)/include
|
|
|
|
ALL_TARGETS := bootconfig
|
|
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
|
|
|
|
all: $(ALL_PROGRAMS) test
|
|
|
|
$(OUTPUT)bootconfig: main.c include/linux/bootconfig.h $(LIBSRC)
|
|
$(CC) $(filter %.c,$^) $(CFLAGS) $(LDFLAGS) -o $@
|
|
|
|
test: $(ALL_PROGRAMS) test-bootconfig.sh
|
|
./test-bootconfig.sh $(OUTPUT)
|
|
|
|
install: $(ALL_PROGRAMS)
|
|
install $(OUTPUT)bootconfig $(DESTDIR)$(bindir)
|
|
|
|
clean:
|
|
$(RM) -f $(OUTPUT)*.o $(ALL_PROGRAMS)
|