Testing for 32bit or 64bit Cygwin in Makefile?
Dimitry Andric
dimitry@unified-streaming.com
Wed Nov 6 15:30:53 GMT 2024
On 6 Nov 2024, at 16:11, Sebastian Feld via Cygwin <cygwin@cygwin.com> wrote:
>
> How can I test in a /usr/bin/make Makefile whether I am running on a
> 32bit or 64bit Cygwin (not Windows kernel)?
Usually in a shell you use "uname -m", or with bash specifically, the $HOSTTYPE variable.
However in GNU make you should be able to use the internal variable $(MAKE_HOST). On my Cygwin installation, this gives the value "x86_64-pc-cygwin". Since I do not have any 32-bit Cygwin installation, I cannot tell you what the exact value is, but my guess would be "i386-pc-cygwin", or something like that.
-Dimitry
More information about the Cygwin
mailing list