sub-dirs := $(shell find -L $(SDK_DIR)/source/drivers -maxdepth 2 -mindepth 1 -name Makefile) $(info bootloader drivers: $(subst Makefile,,$(subst $(SDK_DIR)/source/drivers/,,$(sub-dirs)))) obj-y += $(subst Makefile,,$(subst $(SDK_DIR)/source/drivers/,,$(sub-dirs))) obj- += dummy.o