Upgrade Makefile. Fix warnings in sources.