Shards build option

I could not find the syntax to set a compile flag (such as -D DEV) at the target level in the shard.yml file.
Is this possible?

No. Is some discussion in Use as a Build System · Issue #110 · crystal-lang/shards · GitHub. Workaround would be to probably just use a Makefile.