Tutorial by Examples

Use .PHONY to specify the targets that are not files, e.g., clean or mrproper. Good example .PHONY: clean clean: rm *.o temp Bad example clean: rm *.o temp In the good example make knows that clean is not a file, therefore it will not search if it is or not up to date and will ex...
Recursive use of make means using make as a command within a makefile. This technique is useful when a large project contains sub-directories, each having their respective makefiles. The following example will help understand advantage of using .PHONY with recursive make. /main |_ Makefile ...

Page 1 of 1