Step by Step
1, autoscan
2, move configure.scan to configure.ac, and vim configure.ac like this:
AM_INIT_AUTOMAKE(myprojectname , version)
AC_OUTPUT(Makefile subdir/Makefile subdir1/Makefile)
AC_PROG_RANLIB
3, aclocal : a perl script
4, autoconf -fvi
5, make Makefile.am, as:
bin_PROGRAMS=myprogram
SUBDIRS=sub1
myprogram_SOURCES= \
a.cpp \
b.cpp
EXTRA_DIST= \
a.h \
b.h
myprogram_LDADD = libsub1.a
myprogram_LDFLAGS = -lpthread -lglib-2.0 -L/usr/bin $(all_libraries)
AM_CXXFLAGS = -D_LINUX
INCLUDES=-IPassport -Isub1/ -I/usr/include/glib-2.0 \
-I/usr/lib/glib-2.0/include $(all_includes)
6, autoheader declare config.h.in
7, automake --add-missing
8, ./configure
9, make
10, example:
template.tar.gz
you can run the script name of rmlocal, and try it .
author:cnangel