/usr/bin/ld: block_addr.o: relocation R_X86_64_PC32 against symbol `baseb' can not be used when making a shared object; recompile with -fPIC
This error indicates that you have not used -fPIC
when compiling all the objects to go your shared library.
The part of a Makefile that you have shown does link, not compile, -fPIC
has no effect there.
PS.Example:
var.c
int var = 10;
Compile/link with:
gcc -fPIC -shared -o libvar.so var.c
main.c
extern int var;
int main() { return var; }
Compile/link with
gcc main.c -L. -lvar -o main