How to use D compiler like DMD or LDC in OpenWrt?

Hi,
As the title says, I want to compile a program written in D language for OpenWRT, but I don't know how to use the D compiler with OpenWRT.
I've tried installing DMD on my host, and writing a Makefile with the statement source ~/dlang/ldc-1.30.0/activate, but that doesn't seem to work.
So is it possible for OpenWRT to use the D compiler? Thank you!

As (usually the) openwrt programs are cross compiled you first need the D compiler compiled for the specific soc (cpu)