我正在编译一个依赖于 /usr/lib 路径中的两个库的应用程序但是 yocto recipe 无法找到该库。如何在 bitbake 配方中赋予 .so 库路径依赖性。
我的食谱如下:
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit autotools
SRC_URI = " \
file://halapplication.tgz \
"
S="${WORKDIR}"
DEPENDS = "hal halcore"
do_compile[depends] += "hal:do_install"
do_compile[depends] += "halcore:do_install"
EXTRA_OECONF_append += "${STAGING_LIBDIR}"
do_compile() {
oe_runmake -B -C ${S}/halapplication
}
do_install() {
install -d ${D}/usr/bin
install -m 0644 ${WORKDIR}/halapplication/halapp ${D}/usr/bin
}
#RDEPENDS_${PN} = "hal halcore"
do_configure[noexec] = "1"
在 halapplication/Makefile 我这样做:
SRC = ${wildcard src/*.c}
all: ${SRC}
${CC} $(CFLAGS_APPEND) -Iinclude libhal.so libhalcore.so src/main.c -o halapp