[Top][All Lists]

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

Re: Recursive source inclusion

From: Ralf Wildenhues
Subject: Re: Recursive source inclusion
Date: Sun, 7 Dec 2008 12:19:05 +0100
User-agent: Mutt/1.5.18 (2008-05-17)


* LCID Fire wrote on Fri, Dec 05, 2008 at 10:50:18PM CET:
> Another try - maybe someone shows some mercy and answers my question

Well, it's not so much an issue of mercy, rather than an issue of time.
There is way too little of the latter, and so necessarily things fall
through the cracks sometimes.  Sorry about that.  Of course, it
sometimes helps to re-explain things, because the problem may just be
easier to understand then.  :-)

> I have a directory structure:
> src
> |---gtk
> |    |---gtkapp.c
> |    |
> |
> |---core.c
> |
> I'd like to use automake to build this.
> The residing in the gtk directory looks like:
> bin_PROGRAMS = gtkapp
> gtkapp_SOURCES = gtkapp.c
> What I'd like to do is to include core.c in the gtkapp build - but NOT
> by directly adding it to gtkapp_SOURCES (I can give a good explanation
> why - but it would ruin the simplicity of the example).

How about adding it to a convenience archive, and then adding that to
your build.  In this case, add

  noinst_LIBRARIES = libcore.a
  libcore_a_SOURCES = core.c

to src/, and add
  gtkapp_LDADD = ../libcore.a

to gtk/  Inside src/, ensure that files in the
current directory are built before recursing, e.g., by
  SUBDIRS = . gtk

Hope that helps.


reply via email to

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