simplify setup script and improve Makefile to try to treat different rmnlib versions