Add doc directory in cmake.mk and comply with reference document (commit: 33b2d2a)
Bump gd to 2.2.4 (commit: 45a0aff)