mod to Makefile to handle ais automatically