C "make" function in Cygwin

I am working through Learn C the Hard Way. I have gotten to exercise 2 where I am supposed to be using the make command. (I tried it as well in exercise 1 but it did not work.)

Below, I have copied in the commands used in Cygwin as well as the code I have written. I am also using Windows.

______@DESKTOP-E67D4AF ~
$ nano ex2_1.mak

______@DESKTOP-E67D4AF ~
$ make clean
-bash: make: command not found

______@DESKTOP-E67D4AF ~
$ pwd
/home/Erin Butler

______@DESKTOP-E67D4AF ~
$ make clean
-bash: make: command not found

CFLAGS-=Wall -g

clean:
rm -f ex1

Is this a necessary command for future exercises or will I be fine to continue using the gcc compiler to create the files?

No, you definitely need make.

I don’t know how to install it in Cygwin, maybe someone else here or Google can help you with that.

Alternatively, try using Ubuntu with the Windows subsystem for Linux. It works really well and you have all the standard Unix programs either pre-installed – or ready to download and install from the Ubuntu servers with a single command.

I replied privately but it’s possible they use gmake. Try this:

gmake -f ex2_1.make clean
A free service run by Zed A. Shaw for learncodethehardway.org.