At times you may need to test some simple code. You could just use the commands in the shell. But it will soon become a pain as you try to clean and recompile the test code. Instead, a "script" would be handy. This is a template for that simple
Makefile
for *nixmake
Makefile.win
for WindowsNMake
CMakeLists.txt
for the cross-platformCMake
toolchain
The basic differences between a Linux and Windows makefile are explained in the post Makefiles in Windows.