added debug option to Makefile + finished -c

added -g for gcc
finished createfooter function and patched up the logic for
exporting and creating new footers.
it works!