add src/cmd_tid.c and update Makefile