18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ciSUBDIRS := ion 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciTEST_PROGS := run.sh 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci.PHONY: all clean 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciinclude ../lib.mk 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciall: 118c2ecf20Sopenharmony_ci @for DIR in $(SUBDIRS); do \ 128c2ecf20Sopenharmony_ci BUILD_TARGET=$(OUTPUT)/$$DIR; \ 138c2ecf20Sopenharmony_ci mkdir $$BUILD_TARGET -p; \ 148c2ecf20Sopenharmony_ci make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ 158c2ecf20Sopenharmony_ci #SUBDIR test prog name should be in the form: SUBDIR_test.sh \ 168c2ecf20Sopenharmony_ci TEST=$$DIR"_test.sh"; \ 178c2ecf20Sopenharmony_ci if [ -e $$DIR/$$TEST ]; then \ 188c2ecf20Sopenharmony_ci rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \ 198c2ecf20Sopenharmony_ci fi \ 208c2ecf20Sopenharmony_ci done 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cioverride define INSTALL_RULE 238c2ecf20Sopenharmony_ci mkdir -p $(INSTALL_PATH) 248c2ecf20Sopenharmony_ciinstall -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci @for SUBDIR in $(SUBDIRS); do \ 278c2ecf20Sopenharmony_ci BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \ 288c2ecf20Sopenharmony_ci mkdir $$BUILD_TARGET -p; \ 298c2ecf20Sopenharmony_ci $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \ 308c2ecf20Sopenharmony_ci done; 318c2ecf20Sopenharmony_ciendef 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_cioverride define CLEAN 348c2ecf20Sopenharmony_ci @for DIR in $(SUBDIRS); do \ 358c2ecf20Sopenharmony_ci BUILD_TARGET=$(OUTPUT)/$$DIR; \ 368c2ecf20Sopenharmony_ci mkdir $$BUILD_TARGET -p; \ 378c2ecf20Sopenharmony_ci make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ 388c2ecf20Sopenharmony_ci done 398c2ecf20Sopenharmony_ciendef 40