afs: Provide a splice-read wrapper
[linux-block.git] / tools / bootconfig / Makefile
CommitLineData
950313eb
MH
1# SPDX-License-Identifier: GPL-2.0
2# Makefile for bootconfig command
306b69dc 3include ../scripts/Makefile.include
950313eb
MH
4
5bindir ?= /usr/bin
6
306b69dc
MH
7ifeq ($(srctree),)
8srctree := $(patsubst %/,%,$(dir $(CURDIR)))
9srctree := $(patsubst %/,%,$(dir $(srctree)))
10endif
950313eb 11
306b69dc
MH
12LIBSRC = $(srctree)/lib/bootconfig.c $(srctree)/include/linux/bootconfig.h
13CFLAGS = -Wall -g -I$(CURDIR)/include
950313eb 14
306b69dc
MH
15ALL_TARGETS := bootconfig
16ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
950313eb 17
f30f00cc 18all: $(ALL_PROGRAMS) test
306b69dc 19
4ee1b4ca 20$(OUTPUT)bootconfig: main.c include/linux/bootconfig.h $(LIBSRC)
950313eb
MH
21 $(CC) $(filter %.c,$^) $(CFLAGS) -o $@
22
306b69dc
MH
23test: $(ALL_PROGRAMS) test-bootconfig.sh
24 ./test-bootconfig.sh $(OUTPUT)
950313eb 25
306b69dc
MH
26install: $(ALL_PROGRAMS)
27 install $(OUTPUT)bootconfig $(DESTDIR)$(bindir)
081c6536 28
950313eb 29clean:
306b69dc 30 $(RM) -f $(OUTPUT)*.o $(ALL_PROGRAMS)