If it's a simple C file:
Open in Visual Studio as a C++ project, compile and run from there.
If it's a complex project with a Makefile:
Install Cygwin, with the packages specified here: https://www.maketecheasier.com/compile-linux-programs-under-windows
(gcc: devel > gcc-core, gcc-g++; make: devel > make; wget: web> wget; libiconv (unicode): libs > libiconv, libiconv2)
(Note: not sure about difference between libiconv and libiconv2; I think you may need both.)
Open a Cygwin command shell. Go to root. (cd .. all the way up). Then "cd /cygdrive/C". You are now on the C: drive. Browse to the folder containing your make file.
Run "make". Or, if a particular option is wanted, "make all", "make demo", "make clean" etc etc.
Comments on editing the Makefile / config:
To run with nmake or MinGW32-make (the native Windows version of make, and a more functional program you can use for make on Windows.)
But really, better if you don't even try to edit Makefiles. Just use Cygwin, if you have them already.
- Compiler should be cl.exe, not gcc. Ditto linker.
- Variables should be specified with $() not ${}
-rm becomes del
-cp becomes copy
-o specifies output file, becomes /OUT
The cd command just wouldn't work for me - eventually I gave up and installed Cygwin, which worked perfectly.