【发布时间】:2015-12-03 01:12:13
【问题描述】:
Your makefile does too much work when only cpp2html.c has been changed:
gcc -g -c cpp2html.c
gcc -g cpp2html.o lex.yy.o
gcc -g -DDEBUG cpp2html.o lex.yy.o -o cpp2html
不起作用,我几乎尝试了每个序列。我的代码如下:
cpp2html: cpp2html.o lex.yy.o
gcc {g cpp2html.o lex.yy.o
gcc -g -DDEBUG cpp2html.o lex.yy.o -o cpp2html
cpp2html.o: cpp2html.c
gcc -g -c cpp2html.c
lex.yy.c: cppscanner.l
flex cppscanner.l
lex.yy.o: lex.yy.c
gcc -g -c lex.yy.c
【问题讨论】:
-
gcc -g cpp2html.o lex.yy.o到底应该做什么? -
取出第一个 gcc 工作。非常感谢@WillBriggs