Implement flexible target specification

See commit message.
Could you preserve this comment where `dead_strip` was moved to?