On 11/04/2010 03:10, isulsz wrote:
Hi,
I am new to GNU Auto tools and I am trying to build a project that contains
several source files and a static library. My directory is like:
(project root)/src/app/: This contains the source files to build a binary
(project root)/src/Random/: This contains the source files to build a
library called librng.a

The Makefile.am in /src/Random/ is:
lib_LIBRARIES = librng.a
librng_a_SOURCES = (A list of .cpp and .h files)

The Makefile.am in /src is
SUBDIRS = app Random

The Makefile.am in (project root) is
SUBDIRS = src

The configure.in is
AC_INIT(./src/app/SimpMSourSimu.cpp)
I usually use
AC_INIT([MyProg], [1.0.0], [em...@somewhere.com], [program])
AC_CONFIG_SRCDIR(src/app/SimpMSourSimu.cpp)
AM_INIT_AUTOMAKE(MultiSour, 0.8)
and here I usually use
AM_INIT_AUTOMAKE([dist-bzip2])
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_OUTPUT(src/app/Makefile, src/Random/Makefile, Makefile)
I see you're also missing "src/Makefile" that will be needed to recurse into app and random.

I ran:
aclocal
autoconf
libtoolize --automake
automake

But when I run ./configure, it says
src/Random/Makefile: No such file or directory

And I cannot find Makefile.in in src/Random directory. But  I can find
Makefile.in in src/app directory.
Why the automake not generate Makefile.in in src/Random directory?
I'm not entirely sure myself, without recreating your setup. I'm surmising it might be because of an incomplete AC_OUTPUT statement.
Thanks!



Reply via email to