factor out common rules from generated Makefile into xbsv/Makefile.build