Add -fPIC compiler flag in Makefile
Detect architecture when building debian package
Cosmetic changes to avoid some compiler warnings