Don't cast calls to malloc().
Fix dependencies for Yacc files. Improve Makefile POSIX compliance.

Parallel building issue pointed out by murphm8 and chastai.