Add Makefile. Add function definitions. Modify main.c.