- Define _GNU_SOURCE via Makefile to fix Linux compilation.
  Fixes missing prototypes for strerror_r, strdup, and madvise.
  Thanks to Felipe Pena (@felipensp) - Refs merces/libpe#3.
- The Makefile now uses GNU conventions [1], and also supports building
  multiple source files.
- Move common macros and error related code to their own files.

[1] The GNU coding standards, March 8, 2013.
    http://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html