autoconf & automake
autoscan で configure.ac の雛型ファイル configure.scan を生成してくれる。
autoscan mv configure.scan configure.ac
configure.ac を編集する
AC_INIT(PACKAGE-NAME, VERSION, BUG-REPORT) AC_INIT(target, 0.1, xx@yy.zz.jp)とか。 AM_INIT_AUTOMAKE automake を使うならAM_で始まるマクロを足す。 AC_CONFIG_FILES([])を AC_CONFIG_FILES([Makefile src/Makefile])に変更 (Makefile.am を先に作っておけばこの変更は不要)
automake 用に Makefile.am を作る。
target/Makefile
SRCDIRS = src
target/src/Makefile
bin_PROGRAMS = target target_SOURCES = target.c
その他のファイルを用意する。
touch NEWS README AUTHORS ChangeLog
最後。
aclocal && autoheader && automake -a -c && autoconf
configure.ac を変更したら。
autoreconf -i