Some error is corrected.

For example:
int on_serial => extern int on_serial changed in serial.h
int on_serial added in serial.c
Makefile updated.