Adjust Makefile hierarchy, and update to use std=c99.