automake
[Top][All Lists]
Advanced

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

Re: Automake for other language issue.


From: Ralf Wildenhues
Subject: Re: Automake for other language issue.
Date: Fri, 5 Sep 2008 08:10:42 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

* PhilFine wrote on Fri, Sep 05, 2008 at 01:15:05AM CEST:
> 
> .ccvm.o:
>       my_gcc -c -O3 $(GST_CFLAGS) -o $@ $^

Consider making this
  .ccvm.$(OBJEXT):

and please note that $^ is GNU make-specific, but you can use $< here
(if that is the right thing for you to use).

FWIW, I would always wrap stuff like my_gcc in a variable so it can be
overridden on the command line.

> plugin_LTLIBRARIES = libgstvideopip.la
> 
> libgstvideopip_la_SOURCES = gstvideopip.c pip_helper.ccvm
> 
> libgstvideopip_la_CFLAGS = $(GST_CFLAGS) 
> libgstvideopip_la_LIBADD = $(GST_LIBS) 
> libgstvideopip_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) /opt/local/lib/libccvm.a
> pip_helper.o

Put the library and the additional object in *LIBADD, not *LDFLAGS.
Consider not using an absolute name for the library, your users are
certainly not all going to have the library at that place.  (Even if
you're the only one using this now, plan for later, with many many
users ;-)

A fine point here, which you already seem to have noted: the per-target
compile flags (in this case libgstvideopip_la_CFLAGS) don't apply to the
pip_helper.ccvm file.  That is unfortunate.

If this Makefile.am doesn't list other sources that don't need those
flags, you can simply put them in AM_CFLAGS and avoid renamed objects
that way.

Another note: libtool will be upset that you don't feed it a PIC object
(and it cannot see that you do, even if you do).

> noinst_HEADERS = gstvideopip.h pip_helper.h

Hope that helps.

Cheers,
Ralf




reply via email to

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