PDA

View Full Version : distinguish windows and unix in Makefile



magland
4th April 2007, 19:39
How can I distinguish between windows and unix in a Makefile (not using qmake or any such thing)

if windows {do this}
if unix {do that}

Also, does anyone know if there is a #define for windows, e.g.
#ifdef WINDOWS-OR-SOMETHING
do this
#else
do that
#endif

Thanks!

wysota
4th April 2007, 20:43
Q_OS_WIN
Q_OS_UNIX

Check the docs for others.

Besides that different compilers define different macros regardless if you use Qt or not.