automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with dependencies


From: wolff
Subject: Problem with dependencies
Date: Mon, 23 Feb 2004 00:03:52 +0100

Hi,

I have the following directory structure:

libs/
libs/libA/
libs/libA/example

Inside of the directory "src/libA" a library is built which should be used in 
the program 
built in the directory "src/libA/example", therefore the library has to be 
built first. I have 
created the following files:

libs/Makefile.am:

SUBDIRS = libA

libs/libA/Makefile.am

SUBDIRS = example
noinst_LIBRARIES = libA.a
libA_a_SOURCES = a.cpp b.cpp

libs/libA/example/Makefile.am

noinst_PROGRAMS = libAtest
libAtest_SOURCES = libAtest.cpp
libAtest_LDADD = $(top_builddir)/libs/libA/libA.a

Of course, this did not work, because "make" first enters the directory 
"src/libA/example". So I added the following line

libAtest_DEPENDENCIES = $(top_builddir)/libs/libA/libA.a

I assumed from the "info" and "man" pages, that this would tell the system to 
first 
build the library. But it fails. I still changes to directory 
"libs/libA/example" first and 
comes up with the following error:

* No rule to make target: ../../../libs/libA/libA.a

Anyone got a hint?

Best regards,
Tobias.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]