steal Teacup's makefiles