Question

Is there a difference between using a makefile and a Makefile?

Was it helpful?

Solution

gmake uses the first "make" file found using the following order:

GNUmakefile, makefile, Makefile

Otherwise, they are semantically equivalent. GNU recommends only using GNUmakefile if you are using GNU extensions.

Source

OTHER TIPS

No, there is none. Even on platforms that have case-sensitive file systems, the 'make' program will look for both names. GNU Make checks for 'makefile' then for 'Makefile' (technically it checks for GNUmakefile first, but you should not need to use that name).

Oops. Should've Googled it.

If a directory has a makefile and a Makefile, gmake will take the makefile in preference.

So. Didn't know about GNUmakefile. Thanks tvanfosson! (-;

Don't know about Gamecat's suggestion as that is the opposite of what I found when I tested.

Thanks florin, your suggestion is what I've found as well now.

makefile then Makefile (superceded by GNUmakefile it seems.)

cheers,

Rob

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top