Remove repeated code blocks in ffi-cdecl.lua and fix Makefile dependencies