A makefile is used by the make program to know what to build.
Nobody wants to type gcc -Wall hello.c -o hello over and over.
gcc -Wall hello.c -o hello
CC=gcc CFLAGS=-Wall -pedantic hello: hello.c $(CC) $(CFLAGS) hello.c -o hello