reorganize generated target into target.h and target.cpp