Edit makefiles to allow for compilation on different architectures

Small little hack to the various makefiles of nbproject/.
These use uname to get the arch (eg x86, x86_64) for use in the build path and various macros and use getconf to determine whether the system is 32 bit or 64 bit for setting the appropriate CFLAGS and CXXFLAGS

Tested on Gentoo x86 and x86_64.