# Coulde people answer these questions started with ``# [Q:'' in the following
?
SHELL=/bin/sh
# This file contains a set of rules used by the "make"
# command. This makefile $(MAKEFILE) tells "make" how the
# executable sum_up_down $(COMMAND) should be created
# from the source files $(SRCS) via the object
# files $(OBJS) and the header files $(HDRS); type the command:
# "make -f make_program"
# where make_program should be replaced by the name of
# the makefile.
#
# This fi
g****c 发帖数: 299
2
# [Q: What does the following do? ]
link object file with lib if it exists
$(COMMAND): $(OBJS) $(MAKEFILE)
$(CC) -o $(COMMAND) $(OBJS) $(LDFLAGS) $(LIBS)
# [Q: What is LIBS? ]
I don't see LIBS defined
# [Q: What does the following do? ]
sum_up_down.o : sum_up_down.cpp $(MAKEFILE)
$(CC) $(CFLAGS) $(WARNFLAGS) -c sum_up_down.cpp -o sum_up_down.o
compile to object file
following
【在 s**********r 的大作中提到】 : # Coulde people answer these questions started with ``# [Q:'' in the following : ? : SHELL=/bin/sh : # This file contains a set of rules used by the "make" : # command. This makefile $(MAKEFILE) tells "make" how the : # executable sum_up_down $(COMMAND) should be created : # from the source files $(SRCS) via the object : # files $(OBJS) and the header files $(HDRS); type the command: : # "make -f make_program" : # where make_program should be replaced by the name of