update makefile to add mkdir.c
update function