186878f14SJakub Kicinski# SPDX-License-Identifier: GPL-2.0 286878f14SJakub Kicinski 386878f14SJakub KicinskiSUBDIRS = lib generated samples 486878f14SJakub Kicinski 5*07c3cc51SJakub Kicinskiall: $(SUBDIRS) libynl.a 686878f14SJakub Kicinski 79cf9b570SJakub Kicinskisamples: | lib generated 8*07c3cc51SJakub Kicinskilibynl.a: | lib generated 9*07c3cc51SJakub Kicinski @echo -e "\tAR $@" 10*07c3cc51SJakub Kicinski @ar rcs $@ lib/ynl.o generated/*-user.o 119cf9b570SJakub Kicinski 1286878f14SJakub Kicinski$(SUBDIRS): 1386878f14SJakub Kicinski @if [ -f "$@/Makefile" ] ; then \ 1486878f14SJakub Kicinski $(MAKE) -C $@ ; \ 1586878f14SJakub Kicinski fi 1686878f14SJakub Kicinski 174e887471SJakub Kicinskiclean distclean: 1886878f14SJakub Kicinski @for dir in $(SUBDIRS) ; do \ 1986878f14SJakub Kicinski if [ -f "$$dir/Makefile" ] ; then \ 2086878f14SJakub Kicinski $(MAKE) -C $$dir $@; \ 2186878f14SJakub Kicinski fi \ 2286878f14SJakub Kicinski done 23*07c3cc51SJakub Kicinski rm -f libynl.a 2486878f14SJakub Kicinski 251d8617b2SJakub Kicinski.PHONY: all clean distclean $(SUBDIRS) 26