Home Segments Index Top Previous Next

692: Mainline

Makefiles also contain information about what to do when a depended-on file changes. This information is provided in command lines, each of which immediately follows a dependency line. The command line looks like a command that you would issue yourself if you were providing a command line by hand. For example, if you were to relink the object files to produce a new analyze_trades program, you would issue the following command:

cc -o analyze_trades main.o trades.o mode.o 

Note, however, that command lines in makefiles must begin with a tab character:

        cc -o analyze_trades main.o trades.o mode.o