automake
[Top][All Lists]
Advanced

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

Re: declaring sources ... and a big thankyou!


From: Craig Sanders
Subject: Re: declaring sources ... and a big thankyou!
Date: Wed, 15 Aug 2007 17:40:35 +1000

Hello Ralf.

Your response to this question has cleared up some issues that I had as well! I 
want to thank both yourself and everyone else for all the help that they 
provide on these mailing lists and for being such fantastic Ambassadors for the 
GNU Autotools. All of your collective assistance and shared wisdom is greatly 
appreciated.


- Craig Sanders

Ralf Wildenhues <address@hidden> wrote:> 
> 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 Makefile.am 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
> times.
> 
>> 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 configure.ac.  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/libhmi_runtime.la
> 
> (if created with libtool), because that way, automake will add proper
> dependencies to the library.
> 
> Hope that helps.
> 
> Cheers,
> Ralf




reply via email to

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