automake
[Top][All Lists]
Advanced

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

Re: cyclic dependancy


From: Neel Basu
Subject: Re: cyclic dependancy
Date: Sat, 25 Oct 2008 17:52:59 +0530
User-agent: KMail/1.9.9

Here is my makifile.am

cgixx/Makefile.am
AUTOMAKE_OPTIONS = foreign 1.4
SUBDIRS = cgi++ src
#Doesn't order matter here ?? and I think cgi++ should come first.

cgixx/cgi++/Makefile.am
INCLUDES =
#It doesn't need to include anything else. rather others include this one.
METASOURCES = AUTO
lib_LTLIBRARIES = libcgixx.la
noinst_HEADERS =  NOT-MENTIONED
libcgixx_la_SOURCES = NOT_MENTIONED
SUBDIRS = jsutil

cgixx/cgi++/jusutil/Makefile.am
INCLUDES = -I$(top_srcdir)/cgi++
METASOURCES = AUTO
noinst_HEADERS = NOT-MENTIONED
lib_LIBRARIES = libcgixx-jsutil.a
libcgixx_jsutil_a_SOURCES = NOT-MENTIONED
libcgixx_jsutil_a_LIBADD = $(top_builddir)/cgi++/libcgixx.la

cgixx/src/MakeFile.am
bin_PROGRAMS = cgixx
cgixx_SOURCES = cgixx.cpp myapp.cpp

# set the include path found by configure
INCLUDES = -I$(top_srcdir)/cgi++ -I$(top_srcdir)/cgi++/jsutil $(all_includes)

# the library search path.
cgixx_LDFLAGS = $(all_libraries)
noinst_HEADERS = myapp.h
cgixx_LDADD = $(top_builddir)/cgi++/jsutil/libcgixx-jsutil.a \
        $(top_builddir)/cgi++/libcgixx.la 
$(top_builddir)/cgi++/jsutil/libcgixx-jsutil.la

Hope this makes it more clear.


On Saturday 25 Oct 2008 1:41:02 pm Ralf Wildenhues wrote:
> Hello Neel,
>
> * Neel Basu wrote on Sat, Oct 25, 2008 at 08:33:20AM CEST:
> > <pre>
> > cgixx
> >
> >     |-- cgi++        .---> libcgixx.la   <----.
> >     |   `-- jsutil     |-->  libcgixx-js.la ------'
> >
> >     '-- src     ------'
> > </pre>
> >
> > libcgixx is the independant one and doesn't need any other libs to be
> > compiled but libcgixx-js requirs libcgixx for compilation. But the
> > codes written in src directory requires both of them.
> >
> > Its not possible to make jsutil on the top level.
> >
> > libcgixx-jsutil will be a static librery which will be linked with
> > libcgixx.la and libcgixx.la/so will be a dynamically loadable librery.
> > But libcgixx-jsutil have dependancy for libcgixx.
>
> I'm not sure I understand the problem.  I don't see a cycle anywhere.
> In cgixx/Makefile.am, you use
>   SUBDIRS = src cgi++
>
> and in src/Makefile.am, you use
>   lib_LTLIBRARIES = libcgixx.la
>   pkglib_LTLIBRARIES = libcgixx-js.la
>   libcgixx_js_la_LDFLAGS = -module -avoid-version
>   libcgixx_js_la_LIBADD = libcgixx.la
>
> and in cgi++/jsutil/Makefile.am, you use
>   lib_LTLIBRARIES = libcgixx-jsutil.la
>   libcgixx_jsutil_la_LDFLAGS = -static
>   libcgixx_jsutil_la_LIBADD = ../../src/libcgixx.la
>
> Problem solved?  If not, then please post some build error output.
>
> Cheers,
> Ralf



-- 
Zigmoyd PHP Framework http://zigmoyd.net




reply via email to

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