Add USE_RPATH to Makefile.base
Use endif in Makefile