[LEDE-DEV] Conditional dependencies in Makefiles
Ted Hess
thess at kitschensync.net
Tue Aug 29 10:08:11 PDT 2017
Hi all -
I have a package (ffmpeg) build problem which is trying to specify a different
DEPENDS for soft-float systems and one for hard-float. The package definition is
as follows:
> define Package/libffmpeg-full
> $(call Package/libffmpeg/Default)
> TITLE+= (full)
> DEPENDS+= @BUILD_PATENTED +alsa-lib +PACKAGE_libopus:libopus
> ifeq ($(CONFIG_SOFT_FLOAT),y)
> DEPENDS+= +PACKAGE_shine:shine
> else
> DEPENDS+= +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264
> endif
> VARIANT:=full
> endef
Thinking the 'ifeq', etc is not proper within a function definition, I have also
tried:
DEPENDS+=$(if $(CONFIG_SOFT_FLOAT),+PACKAGE_shine:shine,+PACKAGE_lame-
lib:lame-lib +PACKAGE_libx264:libx264)
In both cases, the behavior is as if CONFIG_SOFT_FLOAT is not defined.
Any help would be greatly appreciated.
/ted
More information about the Lede-dev
mailing list