Snow Leopard: Fix bugs in creation of main Makefile