Migrate classic makefile to automake