I want to do a make in a directory with both Makefile and makefile. By default, it will execute makefile. Is there any options I can do to execute the Makefile instead?
Thanks in advance.
The easy option is to use -f
:
$ make -f Makefile
From man 1 make
(the GNU make, I presume):
If no
-f
option is present, make will look for the makefilesGNUmakefile
,makefile
, andMakefile
, in that order.
So you con link your Makefile to the name GNUmakefile. But my advise, if you really want this, is to use an alias:
$ alias make='make -f Makefile'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With