1# SPDX-License-Identifier: GPL-2.0-or-later 2# Copyright (c) 2021 SUSE LLC <[email protected]> 3 4top_srcdir ?= ../.. 5 6include $(top_srcdir)/include/mk/env_pre.mk 7include $(top_srcdir)/include/mk/functions.mk 8 9SPARSE_SRC ?= sparse-src 10 11$(SPARSE_SRC)/Makefile: 12ifeq ($(SPARSE_SRC),sparse-src) 13 git submodule update --init 14else 15 $(error "Can't find $(SPARSE_SRC)/Makefile") 16endif 17 18$(SPARSE_SRC)/libsparse.a: $(SPARSE_SRC)/Makefile 19 $(MAKE) -C $(SPARSE_SRC) libsparse.a 20 21HOST_MAKE_TARGETS := sparse-ltp 22MAKE_DEPS += $(SPARSE_SRC)/libsparse.a 23HOST_CFLAGS += -I$(SPARSE_SRC) -Werror -Wno-null-pointer-subtraction 24HOST_LDLIBS += $(SPARSE_SRC)/libsparse.a 25 26 27include $(top_srcdir)/include/mk/generic_leaf_target.mk 28