update Makefile to build mapping table
fix encoding bug in table generator
add tables