rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #Basic Configuration |
| 2 | DESCRIPTION = "MD API library." |
| 3 | SECTION = "base" |
| 4 | LICENSE = "MediaTekProprietary" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 6 | DEPENDS = "libatch libmwkal netmngrprofile" |
| 7 | MTK_SRC = "${BACH_SRC}/libmdapi" |
| 8 | |
| 9 | WORKONSRC = "${MTK_SRC}" |
| 10 | BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST} -I${STAGING_DIR_HOST}/usr/include/logger -I${STAGING_DIR_HOST}/usr/include/mw_kal" |
| 11 | BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu" |
| 12 | PARALLEL_MAKE = "" |
| 13 | |
| 14 | inherit deploy workonsrc |
| 15 | |
| 16 | #Parameters passed to do_compile() |
| 17 | EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\ |
| 18 | 'PROJECT=${PROJ}'\ |
| 19 | 'PREFIX=${BACH_PREFIX}'\ |
| 20 | 'PACKAGE_ARCH=${PACKAGE_ARCH}'\ |
| 21 | 'PLATFORM_CHIP=${PLATFORM_CHIP}'\ |
| 22 | 'ARCH_SUPER_DONGLE=${ARCH_SUPER_DONGLE}'\ |
| 23 | 'BB_INCLUDE_ADD=${BB_INCLUDE_ADD}'\ |
| 24 | 'BB_LDFLAGS_ADD=${BB_LDFLAGS_ADD}'" |
| 25 | |
| 26 | FILES_${PN} = "${base_libdir}/*.so\ |
| 27 | ${base_bindir}\ |
| 28 | ${base_sbindir}\ |
| 29 | /mnt\ |
| 30 | /tmp\ |
| 31 | /etc\ |
| 32 | /test" |
| 33 | |
| 34 | FILES_${PN}-dev = "${includedir}" |
| 35 | |
| 36 | FILES_${PN}-staticdev = "${base_libdir}/*.a" |
| 37 | |
| 38 | FILES_${PN}-doc = "/doc" |
| 39 | |
| 40 | FILES_${PN}-dbg = "/usr/src/debug \ |
| 41 | ${base_bindir}/.debug \ |
| 42 | ${base_libdir}/.debug \ |
| 43 | ${base_sbindir}/.debug" |
| 44 | |
| 45 | |
| 46 | #Skip strip check in QA test. |
| 47 | INSANE_SKIP_${PN} += "already-stripped" |
| 48 | |
| 49 | |
| 50 | do_compile () { |
| 51 | unset LDFLAGS |
| 52 | if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then |
| 53 | oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float" |
| 54 | elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then |
| 55 | oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float" |
| 56 | else |
| 57 | oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}" |
| 58 | fi |
| 59 | } |
| 60 | |
| 61 | do_install () { |
| 62 | oe_runmake install ROOT=${D} |
| 63 | |
| 64 | if [ -d "${D}/include" ]; then |
| 65 | install -d ${D}${includedir} |
| 66 | cp -af ${D}/include/* ${D}${includedir} |
| 67 | rm -rf ${D}/include |
| 68 | fi |
| 69 | } |
| 70 | |
| 71 | addtask bachclean |
| 72 | do_bachclean () { |
| 73 | oe_runmake clean |
| 74 | } |