Chinaunix

标题: 求救!makefile 出错了 [打印本页]

作者: 镜子    时间: 2003-01-23 14:53
标题: 求救!makefile 出错了
我写了一个很简单的makefile,可是运行make -f makefile 时候出现以下:
"must be a separator on rules line3.stop".makefile文件如下:
  1. Testlib.a:Testlib.o
  2.                   ar crv Testlib.a Testlib.o
  3.           Testlib.o:Testlib.h Testlib.c
  4.                   cc -g -c Testlib.c -o Testlib.o
复制代码


多谢了!!
作者: xuejm    时间: 2003-01-23 15:02
标题: 求救!makefile 出错了
可以写成这样看看

Testlib.a:Testlib.o
<TAB>;ar crv Testlib.a Testlib.o

Testlib.o:Testlib.h Testlib.c
<TAB>;cc -g -c Testlib.c -o Testlib.o

* <TAB>;表示按一次TAB健
作者: 镜子    时间: 2003-01-23 15:29
标题: 求救!makefile 出错了
可以了,谢谢xuejm。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2