blob: 9393b89d166544c65d3d3e2452d6f0e7b8818b76 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#Basic Configuration
2DESCRIPTION = "emdlogger is a MD log control application."
3SECTION = "base"
4LICENSE = "MediaTekProprietary"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
6MTK_SRC = "${BACH_SRC}/telephony/frameworks/opt/mdlogger"
7EMD_OUT = "${WORKDIR}/out"
8CROSS = "${TARGET_PREFIX}"
9PROJECT = "${PROJ}"
10PRODUCT_MODE = "${PROD_MODE}"
11WORKONSRC = "${MTK_SRC}"
12DEPENDS = "platform-libs libsncfg telephonyware"
13
14CFLAGS = "--sysroot=${STAGING_DIR_HOST}\ -I${STAGING_DIR_HOST}/usr/include/logger"
15
16
17inherit deploy workonsrc
18
19#Parameters passed to do_compile()
20EXTRA_OEMAKE = "'CROSS=${CROSS}'\
21 'PREFIX=${BACH_PREFIX}'\
22 'PACKAGE_ARCH=${PACKAGE_ARCH}'\
23 'ROOT=${STAGING_DIR_HOST}'"
24
25
26FILES_${PN} = "${base_sbindir}/emdlogger1 \
27 ${base_sbindir}/emdlogger_ctrl"
28
29FILES_${PN}-dbg = "${base_sbindir}/.debug"
30
31#Skip strip check in QA test.
32#RDEPENDS_${PN} += "telephonyware-dev"
33INSANE_SKIP_${PN} += "dev-deps already-stripped"
34
35
36do_compile () {
37 if [ -d "${WORKONSRC}" ]; then
38 if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
39 oe_runmake all ROOT=${STAGING_DIR_HOST} DEF_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_DIR_HOST}/usr/include/logger -mhard-float"
40
41 else
42 oe_runmake all ROOT=${STAGING_DIR_HOST} DEF_CFLAGS=${CFLAGS}
43 fi
44 else
45 oe_runmake all ROOT=${STAGING_DIR_HOST}
46 fi
47
48}
49
50do_install () {
51 oe_runmake install ROOT=${D}
52
53 if [ -d ${WORKONSRC} ]; then
54 install -d ${D}${base_sbindir}
55 cp -af mdlogger.elf ${D}${base_sbindir}/emdlogger1
56 cp -af mdlogger_ctrl.elf ${D}${base_sbindir}/emdlogger_ctrl
57 fi
58}
59
60addtask bachclean
61do_bachclean () {
62 oe_runmake clean
63}