Check eCampus for lab slides.
Rules:
<target>: <Dependency list>
<tab><command>
Here's a sample Makefile
output.out: driver.o Airplane.o
g++ -Wall -std=c++11 driver.o Airplane.o -o output.out
driver.o: driver.cpp Airplane.h
g++ -Wall -std=c++11 -c driver.cpp
Airplane.o: Airplane.cpp Airplane.h
g++ -Wall -std=c++11 -c Airplane.cpp
clean:
rm *.o
rm output.out
run:
./output.out
Notes:
https://wiki.cse.tamu.edu/index.php/Makefiles_C_C++
https://www.gnu.org/software/make/manual/html_node/Simple-Makefile.html#Simple-Makefile