Added -lm linker option for math library in makefile and fixed missing includes in mapping.h and mapping.c