Use the ./configure --debug flag to determine the build target.

On the command-line build everything Release under Windows by default and then build Debug when ./configure --debug was used.