Answer : The prerequisites in the following
makefile rule
store: main.o store.o
$(CXX) $(CXXFLAGS) -o store main.o store.o
is A. main.o
store.o.
Explanation :
- A simple makefile rule consists of format :
target ....... : prerequisites
........
recipe
...
.....
- store is a target file. A
target is usually a file that is generated
by a program or name of an action that you want to
carry out.
- main.o store.o is the prerequisites.
A prerequisite is an input file
that is used to create a target file. There can be many
prerequisites that can be used for creating target file.
- $(CXX) $(CXXFLAGS) are the variables.
Variables are used to store text string
which is defined once and they can then be substituted in program
later. The use of variable to access it in program is in
format $(variable_name).
- -o store main.o store.o is recipe. A
recipe is a rule with
prerequisite which serves to create target file if
any of the prerequisites change.
- Above all explanation ,the last option is eliminated
already.