Update .gitignore
Use implicit rules and automatic variables in Makefile