2021年3月4日星期四

Why is my simple makefile only printing the rule?

My makefile is written as follows:

all: hello    hello: hello.c      gcc hello.c -o hello  

When I type 'make' into the terminal, the rule gcc hello.c -o hello is printed, but not run. I can tell because no .o files are being created. If I type in the rule to the terminal, it works as expected. I'm using vim to edit the file. What's wrong?

https://stackoverflow.com/questions/66486191/why-is-my-simple-makefile-only-printing-the-rule March 05, 2021 at 11:06AM

没有评论:

发表评论