Update Makefile

Adding detection to insert -fPIC into the build opts, add support for $(R), required for RPM build.