backends need some OO loving

Matt Hoosier matt.hoosier at gmail.com
Wed Aug 29 16:35:36 PDT 2007


On 8/29/07, Matt Hoosier <matt.hoosier at gmail.com> wrote:
> > BTW: If you're autotools-literate please take a look at
> > backend/common/Makefile.am -- it works but I'd like to see if automake
> > can make this more automatic...
> > http://gitweb.freedesktop.org/?p=geoclue.git;a=blob;f=backend/common/Makefile.am
>
> Do you ever want some backend to link one of those, but not the other?
> I guess this is why you separated the two sets of CFLAGS and LDFLAGS
> out.
>
> I'd recommend using a convenience library, to avoiding "guessing" the
> name of the object files. It'd be something like:
>
>   noinst_LIBRARIES = libgeoclue_web_service.a libgeoclue_position_error.a
>
>   libgeoclue_web_service_a_CFLAGS += ...
>   libgeoclue_position_error_a_CFLAGS ++ ...
>
> Then of course you have to change the sites that currently do something like:
>
>   my_backend_LIBADD = .../common/libgeoclue_web_service.a
>
> --Matt
>

I should point out, though, that my solution suffers from the same
problem as yours:

These files won't be compiled in position-independent mode. I don't
know whether you intend these to be linked only with standalone
executables, or only as plugins. If the latter, this is slightly
suboptimal.


More information about the GeoClue mailing list