mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
![Masami Hiramatsu](/assets/img/avatar_default.png)
Cleanup dummy headers in tools/bootconfig/include except for tools/bootconfig/include/linux/bootconfig.h. For this change, I use __KERNEL__ macro to split kernel header #include and introduce xbc_alloc_mem() and xbc_free_mem(). Link: https://lkml.kernel.org/r/163187299574.2366983.18371329724128746091.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
30 lines
768 B
Makefile
30 lines
768 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
|
|
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) -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)
|