Hi, I am new to automake, so please excuse me if this question is basic:
I am trying to use automake 1.4 on an existing software package whose source directory
are organized as a set of subdirectories. How can I write a makefile.am to
automatically generate a library file from these source files? A small example is
like this
In the src directory, there are two subdirectories,
>ls src/
a/ b/
>ls src/*
src/a:
a.c
src/b:
b.c
then in src I add two files:
Makefile.am:
----
lib_LIBRARIES = libjunk.a
libjunk_a_SOURCES = a/a.c b/b.c
----
and configure.in:
----
AC_INIT
AM_INIT_AUTOMAKE(junk, 0.1)
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
AC_OUTPUT(Makefile)
----
then, after this series of commands
>aclocal
>autoconf
>automake -a
automake responds with:
automake: Makefile.am: not supported: source file `a/a.c' is in subdirectory
automake: Makefile.am: not supported: source file `b/b.c' is in subdirectory
so how can I use automake to manage the build of the library? One thing I can do is
to add Makefile.am to each subdirectory to build a .a file there and then combine them
on the top level directory, but this gets tiresome as the number of subdirectories
increases. I hope there is a better way.
_______________________________________________________________________
$1 million in prizes! 20 daily instant winners.
AltaVista Rewards: Click here to win!
http://shopping.altavista.com/e.sdc?e=3
_______________________________________________________________________