[Top][All Lists]

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

Re: declaring sources ...

From: Ralf Wildenhues
Subject: Re: declaring sources ...
Date: Wed, 15 Aug 2007 08:44:59 +0200
User-agent: Mutt/1.5.16 (2007-07-16)

Hello Roberto,

* Roberto Alejandro Espí Muñoz wrote on Tue, Aug 14, 2007 at 05:25:03PM CEST:
> Community:  When I declare sources in each I do it this way:
> elementos = AnalogicPoint.cpp GraphicObjectTool.cpp Table.cpp
> > Application.cpp Group.cpp Tendency.cpp BoundaryBox.cpp Historical.cpp
> > noinst_LIBRARIES = libBase.a
> > libBase_a_SOURCES = $(elementos)
> >
> > AM_CXXFLAGS = -I/usr/include/scada `pkg-config --cflags gtkmm-2.4
> > libglademm-2.4`
> > AM_LDFLAGS = -lhmi_runtime `pkg-config --libs gtkmm-2.4 libglademm-2.4`
> Note all the "XXXX.cpp" files and the AM_CXXFLAGS and AM_LDFLAGS.  The cpp
> files vary over time and I have to refresh the list every time.  Is there
> anyway to declare something like *.cpp??

No.  The limitation is intentional, because then you can have a
ApplicationOld.cpp in your source tree, without having it automatically
compiled or distributed.  Even with revision control, this is handy at

> And for AM_* Flags, they are declared the same way over a number of
> Makefile's.  Can I declare them somehow that all Makefile's get
> updated??

Yes.  AC_SUBST them from  I'd also avoid hard-coding paths
like /usr/include/scada -- what if your users would like to install
scada below $HOME, for example.  Further, -I flags typically belong into
*CPPFLAGS, so in this case in AM_CPPFLAGS.  And -L/-l are better put
into *LDADD, but that's not so much of a problem here.  If
libhmi_runtime is part of your package though (thus also uninstalled),
then you should put it in *LDADD, and list it as relative path, e.g.,
  LDADD = ../lib/

(if created with libtool), because that way, automake will add proper
dependencies to the library.

Hope that helps.


reply via email to

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