| A basic makefile for Hello is:|
is the program that reads Makefile and executes instructions in it. GNU make has several implicit rules, so all need not be written. Rules have overall form of:
target : dependencies
kooth had a slight typo on his example.
The first rule says that in order to create file named 'Hello', one has to have a file named 'Hello.o', and that the command to run is 'gcc -c Hello.c'. The -c flag to gcc says not to run linker. Therefore, 'gcc -c Hello.c' will produce an object file named 'Hello.o'.
The second rule supposedly tells how to convert Hello.c into Hello.o. It's proper command was on line 3.
'gcc Hello.c -o Hello' makes gcc both compile Hello.c into object file and then link that object file into binary named 'Hello'. That is how you would call it from command line. Thus, try 2:
gcc -o Hello Hello.o
gcc -c Hello.c
The nice thing about make is that when you have multiple source files, it will recompile only the ones that have changed since previous compilation.
(Not sure if Ubuntu has the latter.)