brintos

brintos / linux-shallow public Read only

0
0
Text · 768 B · 566c3e0 Raw
31 lines · plain
1# SPDX-License-Identifier: GPL-2.02# Makefile for bootconfig command3include ../scripts/Makefile.include4 5bindir ?= /usr/bin6 7ifeq ($(srctree),)8srctree := $(patsubst %/,%,$(dir $(CURDIR)))9srctree := $(patsubst %/,%,$(dir $(srctree)))10endif11 12LIBSRC = $(srctree)/lib/bootconfig.c $(srctree)/include/linux/bootconfig.h13CFLAGS = -Wall -g -I$(CURDIR)/include14 15ALL_TARGETS := bootconfig16ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))17 18all: $(ALL_PROGRAMS) test19 20$(OUTPUT)bootconfig: main.c include/linux/bootconfig.h $(LIBSRC)21	$(CC) $(filter %.c,$^) $(CFLAGS) -o $@22 23test: $(ALL_PROGRAMS) test-bootconfig.sh24	./test-bootconfig.sh $(OUTPUT)25 26install: $(ALL_PROGRAMS)27	install $(OUTPUT)bootconfig $(DESTDIR)$(bindir)28 29clean:30	$(RM) -f $(OUTPUT)*.o $(ALL_PROGRAMS)31