Reputation: 18242
I'm trying to get started building my own make files, but am having some trouble getting my Mac to use them. I can issue the command make -f makefile.txt
and it compiles my project fine; however, just using make
produces the following:
make: *** No targets specified and no makefile found. Stop.
My makefile looks like this:
all:
g++ main.c -o hello
Am I doing something wrong?
Upvotes: 1
Views: 4610
Reputation:
You're naming the Makefile inappropriately. It should be named simply Makefile
(with no extension), not makefile.txt
.
Upvotes: 4