Updated Makefile to account for globals.c.  Added code to free all globals when gear shuts down.