blob: 433cc6c0fe3980a26f0f0003f3d32113162e0d60 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#Basic Configuration
2DESCRIPTION = "MD API library."
3SECTION = "base"
4LICENSE = "MediaTekProprietary"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
6DEPENDS = "libatch libmwkal netmngrprofile"
7MTK_SRC = "${BACH_SRC}/libmdapi"
8
9WORKONSRC = "${MTK_SRC}"
10BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST} -I${STAGING_DIR_HOST}/usr/include/logger -I${STAGING_DIR_HOST}/usr/include/mw_kal"
11BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
12PARALLEL_MAKE = ""
13
14inherit deploy workonsrc
15
16#Parameters passed to do_compile()
17EXTRA_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
26FILES_${PN} = "${base_libdir}/*.so\
27 ${base_bindir}\
28 ${base_sbindir}\
29 /mnt\
30 /tmp\
31 /etc\
32 /test"
33
34FILES_${PN}-dev = "${includedir}"
35
36FILES_${PN}-staticdev = "${base_libdir}/*.a"
37
38FILES_${PN}-doc = "/doc"
39
40FILES_${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.
47INSANE_SKIP_${PN} += "already-stripped"
48
49
50do_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
61do_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
71addtask bachclean
72do_bachclean () {
73 oe_runmake clean
74}