Initial port.

This commit combines bits from a few disparate repos (make, gen-module)
and shells a lib for events.