# Comments start with a # # Variables: VARIABLE = value VARIABLE += value2 # The most important things are targets # They are made up of a name for the target, # the dependencies of the target, # and a set of rules how the target is created # The lines that define rules to be executed MUST # start with a TAB - not just some whitespace! name: dependency1.h dependency2.h depdendency3.cpp command1 command2 # Variables can be accessed with $( ... ), for example OPTIONS = -g -O3 -fno-inline -march=nocona program.o: program.h program.cpp g++ program.cpp -o program.o $(OPTIONS)