search for makefile pseudo-targets, and see an article, article link
if the author talks about pseudo-targets, it should be written like this:
.PHONY: clean
clean:
but in this example. PHONY: all is written after all. In this example, it is okay for us not to declare all as a pseudo-target? For example, I, make, default to make all, and then prog1 prog2 prog3 their respective dependencies to execute. So why declare all as PHONY, and whether there is a relationship before and after all:prog1 prog2 prog3?
is there any example to familiarize yourself with and use the usage of make?
-sharpsample Makefile
all : prog1 prog2 prog3
.PHONY : all
prog1 : prog1.o utils.o
cc -o prog1 prog1.o utils.o
prog2 : prog2.o
cc -o prog2 prog2.o
prog3 : prog3.o sort.o utils.o
cc -o prog3 prog3.o sort.o utils.o