add prepare.c
use c walk dir
tidy with c ok
doing gen: can work