Make base a shared library
Make engine library PIC
A few fixes in GTM