move more build functions to the Makefile