Chinaunix首页 | 论坛 | 博客
  • 博客访问: 159499
  • 博文数量: 29
  • 博客积分: 1015
  • 博客等级: 上士
  • 技术积分: 300
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-22 12:30
个人简介

喜读书,尤好史。

文章分类

全部博文(29)

文章存档

2012年(10)

2011年(19)

分类: LINUX

2011-11-29 20:48:39

单层目录:
 顺序:
  手写Makefile.am(包括顶层目录和源码目录)
  autoscan,生成configure.scan
  mv configure.scan configure.in
  修改configure.in
  acloal && autoheader
  创建必要文件:README, NEWS, AUTHORS, ChangeLog
  automake -a
  autoconf

多层目录:
 实例:
 test
   |
   |----src
   | |----comm
   | | |----print.h
   | | |----print.c
   | | |----Makefile.am(1)
   | |----main.c
   | |
   | |----Makefile.am(2)
   |
   |----Makefile.am(3)
 1,手写
  Makefile.am(3):
   SUBDIRS = src
  Makefile.am(2):
   SUBDIRS = comm
   bin_PPROGRAMs = print
   print_SOURCES = main.c
   print_LDADD = comm/print.o
  Makefile.am(1):
   noinst_PROGRAMS = appprint
   appprint_SOURCES = print.c print.h
   DEFS = -D_GNU_SOURCE
 2,autoscan生成configure.scan,
  mv configure.scan configure.in
  修改configure.in
 3,aclocal && autoheader
 4,创建必要文件:README, NEWS, AUTHORS, ChangeLog
 5,automake -a
  修改comm下的Makefle.in
   找到类似于
   …….
   clean-noinstPROGRAMS:
    -test -z "$(noinst_PROGRAMS)"
    rm -f $(noinst_PROGRAMS)
    apple$(EXEEXT): $(apple_OBJECTS) $(apple_DEPENDENCIES)
    @rm -f apple$(EXEEXT)
    #$(LINK) $(apple_LDFLAGS) $(apple_OBJECTS) $(apple_LDADD) $(LIBS)------注释掉这一行
    …….
 6,autoconf
阅读(1609) | 评论(1) | 转发(2) |
0

上一篇:没有了

下一篇:linux下samba的简单配置

给主人留下些什么吧!~~

十七岁的回忆2011-12-01 00:05:48

( ^_^ )不错嘛