Added uint32 writing functions and corrected makefiles (thanks emg).