change building script to makefile