1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 # Makefile for bootconfig command 2 # Makefile for bootconfig command 3 include ../scripts/Makefile.include << 4 3 5 bindir ?= /usr/bin 4 bindir ?= /usr/bin 6 5 7 ifeq ($(srctree),) !! 6 HEADER = include/linux/bootconfig.h 8 srctree := $(patsubst %/,%,$(dir $(CURDIR))) !! 7 CFLAGS = -Wall -g -I./include 9 srctree := $(patsubst %/,%,$(dir $(srctree))) << 10 endif << 11 8 12 LIBSRC = $(srctree)/lib/bootconfig.c $(srctree !! 9 PROGS = bootconfig 13 CFLAGS = -Wall -g -I$(CURDIR)/include << 14 10 15 ALL_TARGETS := bootconfig !! 11 all: $(PROGS) 16 ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_ << 17 12 18 all: $(ALL_PROGRAMS) test !! 13 bootconfig: ../../lib/bootconfig.c main.c $(HEADER) 19 << 20 $(OUTPUT)bootconfig: main.c include/linux/boot << 21 $(CC) $(filter %.c,$^) $(CFLAGS) -o $@ 14 $(CC) $(filter %.c,$^) $(CFLAGS) -o $@ 22 15 23 test: $(ALL_PROGRAMS) test-bootconfig.sh !! 16 install: $(PROGS) 24 ./test-bootconfig.sh $(OUTPUT) !! 17 install bootconfig $(DESTDIR)$(bindir) 25 18 26 install: $(ALL_PROGRAMS) !! 19 test: bootconfig 27 install $(OUTPUT)bootconfig $(DESTDIR) !! 20 ./test-bootconfig.sh 28 21 29 clean: 22 clean: 30 $(RM) -f $(OUTPUT)*.o $(ALL_PROGRAMS) !! 23 $(RM) -f *.o bootconfig
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.