Lets say I had the following two rules:
# C++ source file compilation
$(BIN)/%.o: $(SRC)/%.cpp
@$(MKDIR) $(BIN)
@printf "Compiling ${CYAN}$<${NC}\r\n"
@$(CPP) $(CPPFLAGS) -I$(INC) -o $@ $<
$(BIN)/%.o: $(SRC)/*/%.cpp
@$(MKDIR) $(BIN)
@printf "Compiling ${CYAN}$<${NC}\r\n"
@$(CPP) $(CPPFLAGS) -I$(INC) -o $@ $<
They only vary by the additional directory wildcard in the prerequisites. How do I collapse them into a single rule that handles the whole directory subtree at $(SRC)/