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