update makefile for osx
add grad and hess checkers