rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #Basic Configuration |
| 2 | DESCRIPTION = "liblogger module implements the Android logger." |
| 3 | SECTION = "base" |
| 4 | LICENSE = "MediaTekProprietary" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 6 | DEPENDS = "custom" |
| 7 | MTK_SRC = "${BACH_SRC}/liblogger" |
| 8 | |
| 9 | WORKONSRC = "${MTK_SRC}" |
| 10 | #BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}" |
| 11 | BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}" |
| 12 | |
| 13 | inherit deploy workonsrc |
| 14 | |
| 15 | #Parameters passed to do_compile() |
| 16 | EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\ |
| 17 | 'PROJECT=${PROJ}'\ |
| 18 | 'ROOT=${STAGING_DIR_HOST}'\ |
| 19 | 'PLATFORM_CHIP=${PLATFORM_CHIP}'\ |
| 20 | 'LDFLAGS=${BB_LDFLAGS_ADD}'" |
| 21 | |
| 22 | FILES_${PN} = "${base_libdir}/*.so \ |
| 23 | ${base_bindir}\ |
| 24 | ${base_sbindir}\ |
| 25 | ${bindir}\ |
| 26 | /etc" |
| 27 | |
| 28 | FILES_${PN}-dev = "${includedir}/" |
| 29 | |
| 30 | FILES_${PN}-staticdev = "${base_libdir}/*.a" |
| 31 | |
| 32 | FILES_${PN}-doc = "/doc" |
| 33 | |
| 34 | |
| 35 | do_compile () { |
| 36 | if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then |
| 37 | oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float -D__REDIRECT_TO_SYSLOGD__" |
| 38 | elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then |
| 39 | oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float -D__REDIRECT_TO_SYSLOGD__" |
| 40 | else |
| 41 | oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -D__REDIRECT_TO_SYSLOGD__" |
| 42 | fi |
| 43 | } |
| 44 | |
| 45 | do_install () { |
| 46 | oe_runmake install ROOT=${D} |
| 47 | |
| 48 | if [ -d "${WORKONSRC}" ]; then |
| 49 | #Since systemd.bbclass would delete the /etc/init.d DIR, we move the daemons from /etc/init.d to /usr/bin. |
| 50 | install -d ${D}${bindir} |
| 51 | install -m 0755 logcat/logcatd ${D}${bindir}/logcatd |
| 52 | fi |
| 53 | |
| 54 | if [ -d "${D}/include" ]; then |
| 55 | install -d ${D}${includedir} |
| 56 | cp -af ${D}/include/* ${D}${includedir}/ |
| 57 | rm -rf ${D}/include |
| 58 | fi |
| 59 | |
| 60 | |
| 61 | } |
| 62 | |
| 63 | do_pack() { |
| 64 | oe_runmake pack_rootfs |
| 65 | } |
| 66 | |
| 67 | addtask bachclean |
| 68 | do_bachclean () { |
| 69 | oe_runmake clean |
| 70 | } |