Raptor007 / aq2-tng

Action Quake 2: The Next Generation. Raptor007's sandbox for testing changes. When verified stable, this code is pushed to the official aq2-tng repo:
https://github.com/aq2-tng/aq2-tng/tree/bots
4 stars 2 forks source link

Fix for WIN32 and WIN64 build with Linux MinGW cross-compiler #101

Closed stan0x closed 3 years ago

stan0x commented 3 years ago

This is what uname -s says.

quake2@Ubuntu:~$ uname -s Linux

Raptor007 commented 3 years ago

Ah, so it's cross-compiling, not the MinGW Windows environment. That explains why it didn't set WIN32=y automatically.

Usually cross-compilation is achieved by make CC=whatever-gcc but I think this is a common enough use case for the Makefile to attempt automatic detection, perhaps with something like $(shell which i686-w64-mingw32-gcc) to see if a relevant cross-compiler is available.