xxxxxxxxxx
At first you need to create your Makefile you can do that by the following command:
touch Makefile
Then you need to edit your Makefile by using one text-editor (e.g. vim,nano,pico)
Lastly in order to execute the Makefile make sure you are in the same directory as the Makefile and write in the terminal:
make // This will execute the first target of the Makefile.
make [target name] // This will execute the specific target.
xxxxxxxxxx
In order to run shell commands from a Makefile you need to write the commands inside
a target and call make with this target. (NOTE: you need have commands spaced by a TAB)
================
Example:
all:
echo "This is the target all"
clean:
clear
echo "This cleaned the terminal"
In order to execute this you write "make all" or "make clean"