bash script was getting a bit ugly; using make