[add & test] main.cpp halfdone

added main.cpp.
main.cpp is now gmp compatible and compilable.
see tmmake.sh for detail.