Recall that the executable file, analyze_trades
, described in
Chapter 42 and Chapter 43, depends on three object files.
This dependency is reflected in a makefile line in which
analyze_trades
appears, followed by a colon, followed by a list of
the depended-on files:
analyze_trades: main.o trades.o mode.o
A similar line asserts that the main.o
file depends on the
main.c
file and two included header files:
main.o: main.c trades.h mode.h
Finally, the following lines assert that the object files containing member functions depend on both source code files and header files:
trades.o: trades.c trades.h mode.o: mode.c mode.h
Note that dependency lines must begin in the first columnno spaces or tabs are permitted.