blob: 5c41b14689373739553db93861ee5aaa724d6392 [file] [log] [blame]
#Basic Configuration
DESCRIPTION = "liblogger module implements the Android logger."
SECTION = "base"
LICENSE = "MediaTekProprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
DEPENDS = "custom"
MTK_SRC = "${BACH_SRC}/liblogger"
WORKONSRC = "${MTK_SRC}"
#BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}"
inherit deploy workonsrc
#Parameters passed to do_compile()
EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\
'PROJECT=${PROJ}'\
'ROOT=${STAGING_DIR_HOST}'\
'PLATFORM_CHIP=${PLATFORM_CHIP}'\
'LDFLAGS=${BB_LDFLAGS_ADD}'"
FILES_${PN} = "${base_libdir}/*.so \
${base_bindir}\
${base_sbindir}\
${bindir}\
/etc"
FILES_${PN}-dev = "${includedir}/"
FILES_${PN}-staticdev = "${base_libdir}/*.a"
FILES_${PN}-doc = "/doc"
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float -D__REDIRECT_TO_SYSLOGD__"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float -D__REDIRECT_TO_SYSLOGD__"
else
oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -D__REDIRECT_TO_SYSLOGD__"
fi
}
do_install () {
oe_runmake install ROOT=${D}
if [ -d "${WORKONSRC}" ]; then
#Since systemd.bbclass would delete the /etc/init.d DIR, we move the daemons from /etc/init.d to /usr/bin.
install -d ${D}${bindir}
install -m 0755 logcat/logcatd ${D}${bindir}/logcatd
fi
if [ -d "${D}/include" ]; then
install -d ${D}${includedir}
cp -af ${D}/include/* ${D}${includedir}/
rm -rf ${D}/include
fi
}
do_pack() {
oe_runmake pack_rootfs
}
addtask bachclean
do_bachclean () {
oe_runmake clean
}