generalize include/src directory discovery