Fit for GCC.

Add Makefile and sample.
Fix src/frontend/pb_frontend.cpp, src/util/util.cpp and src/core/solver.cpp.