Fix makefile.shared as proposed in gentoo bug report #376643

c.f. https://bugs.gentoo.org/show_bug.cgi?id=376643
update makefile to be able to define a target platform prefix