Fixed makefile error.
Changed build order of libraries.