change build system from makefile to automake