interface autodetect, better makefile