How can I interpolate each color individually (i.e. export an image just with Red Color) using dcraw?

I’m doing a project where I need to export 3 different images from a raw file (DNG or RAF), each image with a different color (Red, Green and Blue).
I’m using dcraw.c, Dave Coffin’s raw photo decoder. I don’t know how I can do this using this software, do you suggest other alternatives?

Best Regards