COMP2113 ENGG1340 Summary
COMP2113 ENGG1340 Summary
Module 4: Makefile
• Define dependency (e.g., abc.o: abc.cpp abc.h → abc.o depends on abc.cpp
and abc.h)
• Teach Linux how to get the target (write down the command below the dependency line
with a tab at the beginning)
• Variables (e.g., $(FLAGS)) and special variables (e.g., $@, $^, $<)
• Phony targets: not actually a target but can use make to call it (e.g., make clean)