SOURCES = $(foreach dir,$(SUBDIRS),$($(subst /,_,$(dir))_SRC))
OBJECTS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SOURCES)))
DEPENDS = $(patsubst %.o,%.d,$(OBJECTS))
SOURCES = $(foreach dir,$(SUBDIRS),$($(subst /,_,$(dir))_SRC))
OBJECTS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SOURCES)))
DEPENDS = $(patsubst %.o,%.d,$(OBJECTS))