2023-06-05 12:01:06 -07:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
SUBDIRS = lib generated samples
|
|
|
|
|
2024-06-28 00:32:50 +00:00
|
|
|
all: $(SUBDIRS) libynl.a
|
2023-06-05 12:01:06 -07:00
|
|
|
|
2023-11-29 11:36:21 -08:00
|
|
|
samples: | lib generated
|
2024-06-28 00:32:50 +00:00
|
|
|
libynl.a: | lib generated
|
|
|
|
@echo -e "\tAR $@"
|
|
|
|
@ar rcs $@ lib/ynl.o generated/*-user.o
|
2023-11-29 11:36:21 -08:00
|
|
|
|
2023-06-05 12:01:06 -07:00
|
|
|
$(SUBDIRS):
|
|
|
|
@if [ -f "$@/Makefile" ] ; then \
|
|
|
|
$(MAKE) -C $@ ; \
|
|
|
|
fi
|
|
|
|
|
2024-03-04 21:13:26 -08:00
|
|
|
clean distclean:
|
2023-06-05 12:01:06 -07:00
|
|
|
@for dir in $(SUBDIRS) ; do \
|
|
|
|
if [ -f "$$dir/Makefile" ] ; then \
|
|
|
|
$(MAKE) -C $$dir $@; \
|
|
|
|
fi \
|
|
|
|
done
|
2024-06-28 00:32:50 +00:00
|
|
|
rm -f libynl.a
|
2023-06-05 12:01:06 -07:00
|
|
|
|
2024-03-04 21:13:27 -08:00
|
|
|
.PHONY: all clean distclean $(SUBDIRS)
|