also fix all warnings and use -Werror
Previously, these Makefiles didn't correctly track header changes. The project doesn't build as a whole, future commits will fix it.