点滴

C++博客 首页 新随笔 联系 聚合 管理
  7 Posts :: 0 Stories :: 0 Comments :: 0 Trackbacks

automake

编译流程
   
sourcecode  ---autoscan-->  configure.scan
                                |
                                |edit
        V
Makefile.am                  configure.ac  --aclocal--> aclocal.m4
    \                       /    |      \                     /
     \                     /     | libtoolize               /
      \ automake --add-missing   |        \               /
                                 V         \             /
           Makefile.in        ltmain.sh       configure
              \                                     /
                 \                                 /
                   \            Makefile          /

 

 

 

libtoolize --force  生成 ltmain.sh

automake --add-missing 生成一下文件,如果没生成,则主动touch
Makefile.am: required file `./NEWS' not found
Makefile.am: required file `./README' not found
Makefile.am: required file `./AUTHORS' not found
Makefile.am: required file `./ChangeLog' not found

Makefile.am
SUBDIRS = lib src
递归到目录中去执行

静态库
AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = test
test_SOURCES = main.c
test_LDADD = $(top_srcdir)/lib/liblatest/libhello22.la

动态库
AUTOMAKE_OPTIONS = foreign
lib_LTLIBRARIES = libhello22.la
libhello22_la_SOURCES = hello-world.c hello-world.h

posted on 2010-02-23 10:31 chage 阅读(592) 评论(0)  编辑 收藏 引用 所属分类: 编译相关

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理