Use prefix supplied via configure script

Fixes to Makefile.{in,BASE}:
- INSTALLDIR is now using @prefix@ variable from ./configure
- Determine endianness for RNG_CFLAGS from `uname -p`
  (should help on PPC machines and the like)

Also, adjusted .gitignore to deal with clutter from building