Implement flexible target specification

See commit message.
Are we sure that 32-bit dragonfly is supported?