I am making a Netbeans C++ project with an existing GNUmakefile. I went to File -> New Project -> C/C++ with Existing Sources and selected the folder with my current files (including the GNUmakefile).
However, when I run my app, I get the following error.
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'. Stop.
BUILD FAILED (exit value 2, total time: 67 ms)
I suspect that my Makefile is named “GNUmakefile”, which differs from “Makefile.” However, I do not want to rename “GNUmakefile,” since I am working on this project with others who want to keep it the same.
Is that why Netbeans complains about my GNUmakefile? How can I tell Netbeans to use GNUmakefile instead?
It looks like you must be invoking make as
make -f Makefile, so you are explicitly (whether you realize it or not) saying to use a makefile calledMakefile. Otherwise, GNU make would happily use GNUmakefile:Note that you only get the error you reported in the last case. So you just need to change how you are invoking GNU make. Alternatively you could symlink
MakefiletoGNUmakefile: