move remaining legacy build options into the lib/Makefile