Akhmad Zaki
Akhmad Zaki

Reputation: 433

Makefile filename convention

I want to compile my C program using gcc version 5.1.0 (tdm64-1) compiler on Windows 10 64-bit using make file. When I named the make file as makefile or Makefile, it compiled successfully. But, when I named it as MAKEFILE, it failed and this error showed:

mingw32-make: *** No targets specified and no makefile found.  Stop.

What I wanna ask is this error happened only on Windows machine or the convention forbid `MAKEFILE' for make file filename?

Upvotes: 1

Views: 509

Answers (1)

igagis
igagis

Reputation: 2079

GNU make uses makefile named makefile or Makefile by default. If it does not find such files it complains.

You can manually specify makefile filename if it differs for this convention like that:

make -f MAKEFILE

Upvotes: 6

Related Questions