build: move top level targets for the libs into the corresponding sections in Makefile.in