1*49cdfc7eSAndroid Build Coastguard Worker# SPDX-License-Identifier: GPL-2.0-or-later 2*49cdfc7eSAndroid Build Coastguard Worker# Copyright (c) 2021 SUSE LLC <[email protected]> 3*49cdfc7eSAndroid Build Coastguard Worker 4*49cdfc7eSAndroid Build Coastguard Workertop_srcdir ?= ../.. 5*49cdfc7eSAndroid Build Coastguard Worker 6*49cdfc7eSAndroid Build Coastguard Workerinclude $(top_srcdir)/include/mk/env_pre.mk 7*49cdfc7eSAndroid Build Coastguard Workerinclude $(top_srcdir)/include/mk/functions.mk 8*49cdfc7eSAndroid Build Coastguard Worker 9*49cdfc7eSAndroid Build Coastguard WorkerSPARSE_SRC ?= sparse-src 10*49cdfc7eSAndroid Build Coastguard Worker 11*49cdfc7eSAndroid Build Coastguard Worker$(SPARSE_SRC)/Makefile: 12*49cdfc7eSAndroid Build Coastguard Workerifeq ($(SPARSE_SRC),sparse-src) 13*49cdfc7eSAndroid Build Coastguard Worker git submodule update --init 14*49cdfc7eSAndroid Build Coastguard Workerelse 15*49cdfc7eSAndroid Build Coastguard Worker $(error "Can't find $(SPARSE_SRC)/Makefile") 16*49cdfc7eSAndroid Build Coastguard Workerendif 17*49cdfc7eSAndroid Build Coastguard Worker 18*49cdfc7eSAndroid Build Coastguard Worker$(SPARSE_SRC)/libsparse.a: $(SPARSE_SRC)/Makefile 19*49cdfc7eSAndroid Build Coastguard Worker $(MAKE) -C $(SPARSE_SRC) libsparse.a 20*49cdfc7eSAndroid Build Coastguard Worker 21*49cdfc7eSAndroid Build Coastguard WorkerHOST_MAKE_TARGETS := sparse-ltp 22*49cdfc7eSAndroid Build Coastguard WorkerMAKE_DEPS += $(SPARSE_SRC)/libsparse.a 23*49cdfc7eSAndroid Build Coastguard WorkerHOST_CFLAGS += -I$(SPARSE_SRC) -Werror -Wno-null-pointer-subtraction 24*49cdfc7eSAndroid Build Coastguard WorkerHOST_LDLIBS += $(SPARSE_SRC)/libsparse.a 25*49cdfc7eSAndroid Build Coastguard Worker 26*49cdfc7eSAndroid Build Coastguard Worker 27*49cdfc7eSAndroid Build Coastguard Workerinclude $(top_srcdir)/include/mk/generic_leaf_target.mk 28