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