Is there a way to know in makefiles if GNU make is running on a linux OS or a windows OS?
I've built a bash script that generates a makefile for building my app and it works fine on my Debian machine. I want to try to build it on MinGW/MSYS, but the problem is that I have to build and run some test programs that check errors in source code, and to run it on Windows, I must add the .exe suffix.
uname command should give you the basic info about the OS. Can you use that, and then make an IF based on the return value?
As not to rewrite everything, here - these two questions may be of some interest to you
1. OS detecting makefile
2. Makefile that distincts between Windows and Unix-like systems