a kind of script that tells the compiler how to build your program.

It gives instructions to the compiler and linker about which source files to use. All you need to do is type make on the command line in the appropriate directory.

ec2-user:~/environment/coursera-cs400/cpp-class (master) $ make
g++ -std=c++14 -O0 -pedantic -Wall -Werror -Wfatal-errors -Wextra -Wno-unused-parameter -Wno-unused-variable -MMD -MP -g -c main.cpp -o .objs/main.o
g++ -std=c++14 -O0 -pedantic -Wall -Werror -Wfatal-errors -Wextra -Wno-unused-parameter -Wno-unused-variable -MMD -MP -g -c Cube.cpp -o .objs/Cube.o
g++ .objs/main.o .objs/Cube.o -std=c++14 -o main

ec2-user:~/environment/coursera-cs400/cpp-class (master) $ ls
Cube.cpp  Cube.h  main  main.cpp  Makefile

When we ran make, it triggered several compilation and linking steps and produced an output file called main, which is the actual executable program!

make clean

ec2-user:~/environment/coursera-cs400/cpp-class (master) $ ls
Cube.cpp  Cube.h  main  main.cpp  Makefile
ec2-user:~/environment/coursera-cs400/cpp-class (master) $ make clean
rm -rf main  .objs  *.o *.d
ec2-user:~/environment/coursera-cs400/cpp-class (master) $ ls
Cube.cpp  Cube.h  main.cpp  Makefile

In this case, the "make clean" script deleted the "main" executable file and the hidden .objs subdirectory.