1# SPDX-License-Identifier: GPL-2.0 2 3# YNL selftest build snippet 4 5# Inputs: 6# 7# YNL_GENS: families we need in the selftests 8# YNL_PROGS: TEST_PROGS which need YNL (TODO, none exist, yet) 9# YNL_GEN_FILES: TEST_GEN_FILES which need YNL 10 11YNL_OUTPUTS := $(patsubst %,$(OUTPUT)/%,$(YNL_GEN_FILES)) 12 13$(YNL_OUTPUTS): $(OUTPUT)/libynl.a 14$(YNL_OUTPUTS): CFLAGS += \ 15 -I$(top_srcdir)/usr/include/ $(KHDR_INCLUDES) \ 16 -I$(top_srcdir)/tools/net/ynl/lib/ \ 17 -I$(top_srcdir)/tools/net/ynl/generated/ 18 19$(OUTPUT)/libynl.a: 20 $(Q)$(MAKE) -C $(top_srcdir)/tools/net/ynl GENS="$(YNL_GENS)" libynl.a 21 $(Q)cp $(top_srcdir)/tools/net/ynl/libynl.a $(OUTPUT)/libynl.a 22