mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
4ee1b4cac2
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>
31 lines
768 B
Makefile
31 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)
|