avatar
Questions about MAKEFILE# Programming - 葵花宝典
s*r
1
# 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
avatar
g*c
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。