build source from main directory