Fix Makefile.in
Implement some calcGNum functions