Fix character code.
Add macro for main function.
Modify entry point.
Update config to add definition.
Update makefiles.