[Buildroot] [PATCH v2] libamcodec: New Package

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Jun 2 07:20:18 UTC 2016


Hello,

On Thu, 2 Jun 2016 07:15:54 +0200, daggs wrote:

> > However, this also means that a number of other variables from your
> > package Makefile will be overridden, such as CFLAGS, CXXFLAGS, LDFLAGS,
> > etc. This sometimes causes some problems.  
> seems like I've encountered such an issue,
> using the format above resulted in missing includes error, e.g. local paths are not part of the flags.
> what is the proper way to fix it?

In the package Makefile, whenever there is:

CFLAGS = foo
LDFLAGS = foo

change it to:

override CFLAGS += foo
override LDFLAGS += foo

> > > +	$(INSTALL) -D -m 0755 $(@D)/amavutils/libamavutils.so $(STAGING_DIR)/usr/lib
> > > +	$(INSTALL) -D -m 0555 $(@D)/amadec/libamadec.so $(STAGING_DIR)/usr/lib
> > > +	$(INSTALL) -D -m 0555 $(@D)/amcodec/libamcodec.so $(STAGING_DIR)/usr/lib  
> > 
> > Full destination path needed.
> >   
> not sure what you mean by Full destination path needed, can you elaborate please?

   $(STAGING_DIR)/usr/lib/libavmavutils.so

as opposed to

   $(STAGING_DIR)/usr/lib

as you're doing currently.

If you do:

   $(INSTALL) -D -m 0555 $(@D)/amcodec/libamcodec.so $(STAGING_DIR)/usr/lib

and $(STAGING_DIR)/usr/lib doesn't already exists as a directory, then
libamcodec.so will be copied as a file named "lib" under
$(STAGING_DIR)/usr.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list