move addon tilegen stuff into the addon
add missing libraries, fix compile