Chinaunix

标题: 这个Makefile怎么写 [打印本页]

作者: ohahu    时间: 2004-05-30 23:19
标题: 这个Makefile怎么写
执行代码在Makefile文件夹下面一个子文件夹

  1. --makefile
  2. --include 文件夹
  3. --bin文件夹 最后结果放这里
  4. --src 实现代码在这里
复制代码

用简单的写法,怎么写都写不出来

  1. #mytool
  2. #makefile在workdir里面
  3. MYTOOLOBJ=$(WORKDIR)/mytool/main.o \
  4.                 $(WORKDIR)/mytool/mytool1.o \
  5.                 $(WORKDIR)/mytool/mytool2.o
  6. mytool:$(MYTOOLOBJ)
  7.         gcc -o $(BINDIR)/$@ $^
  8. .c.o:
  9.         gcc -c $<
复制代码

还有export设置的环境变量会永久保存吗?不会该用什么呢
作者: ohahu    时间: 2004-05-31 19:40
标题: 这个Makefile怎么写
失败,这么大的中国
竟然没有人会吗

打击一下




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