converted build.sh to Makefile