added option to automatically detect architecture in makefile