added -fPIC to C_FLAGS AND CXX_FLAGS to fix linker error