
The recipe uses prerequisites to make a target. The command echo "Hello World" is called the recipe.

For the sake of simplicity, we have not defined any prerequisites in this example. The prerequisites or dependencies follow the target. In the example above, say_hello behaves like a function name, as in any programming language. Now run the file by typing make inside the directory myproject. Create a empty directory myproject containing a file Makefile with this content: say_hello: Let's start by printing the classic "Hello World" on the terminal. Before you start, ensure that make is installed in your system. In this article, we'll explore make and Makefile using basic and advanced examples.


Most open source projects use make to compile a final executable binary, which can then be installed using make install. You may have used make to compile a program from source code. The make utility requires a file, Makefile (or makefile), which defines set of tasks to be executed. If you want to run or update a task when certain files are updated, the make utility can come in handy.
