add preallocate table support
add Makefile