blob: 2c975059552fb7464ee2f3124459239af3117a2f [file] [log] [blame]
lichengzhang29fc2fa2023-08-02 23:20:48 -07001#inherit externalsrc package
2
3DESCRIPTION = "liblynq-qser-gnss"
4LICENSE = "CLOSED"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=3f86c7f456a6d0bbeca155e65084eee1"
xf.li7ccf8372024-03-07 00:08:02 -08006DEPENDS += "liblynq-log libxml2 liblynq-uci libsctel libscrtc libbsp"
lichengzhang29fc2fa2023-08-02 23:20:48 -07007#inherit workonsrc
8WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-gnss/"
9FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
10SRC_URI = " \
11 file://liblynq-qser-gnss\
12 "
13
14SRC-DIR = "${S}/../liblynq-qser-gnss"
15
16TARGET_CC_ARCH += "${LDFLAGS}"
17BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
18BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
19
lichengzhangf492f9d2024-02-22 14:53:41 +080020EXTRA_OEMAKE += "'MOBILETEK_GNSS_TYPE = ${MOBILETEK_GNSS_TYPE}'"
21
22EXTRA_OEMAKE += "'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
23
lichengzhange48d5e52023-10-08 20:27:43 -070024FILES_${PN} += "${bindir} /data/gnss_update"
lichengzhange48d5e52023-10-08 20:27:43 -070025FILES_${PN} += "${base_libdir}/*.so "
lichengzhang29fc2fa2023-08-02 23:20:48 -070026FILES_${PN}-dev = "/test \
27 ${includedir}"
28
29FILES_${PN}-doc = "/doc"
30
31FILES_${PN}-dbg ="${base_bindir}/.debug \
32 ${base_libdir}/.debug \
33 ${base_sbindir}/.debug"
34
35INSANE_SKIP_${PN} += "already-stripped"
36INSANE_SKIP_${PN} += "installed-vs-shipped"
37
38
39#INHIBIT_PACKAGE_STRIP = "1"
40do_compile () {
lichengzhangd1b79a72023-10-09 03:15:57 -070041 oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
lichengzhang29fc2fa2023-08-02 23:20:48 -070042}
43
44do_install () {
45 oe_runmake install -C ${SRC-DIR} ROOT=${D}
lichengzhangd1b79a72023-10-09 03:15:57 -070046
lichengzhang29fc2fa2023-08-02 23:20:48 -070047 if [ -d "${WORKONSRC}" ] ; then
48 install -d ${D}${includedir}/
49 cp -raf ${SRC-DIR}/include/ ${D}${includedir}/
lichengzhange48d5e52023-10-08 20:27:43 -070050 install -d ${D}/data/gnss_update
lichengzhangd1b79a72023-10-09 03:15:57 -070051 install -m 644 ${WORKONSRC}UC6228CI-R3.2.10.100Build8019_mfg.pkg ${D}/data/gnss_update
lichengzhange48d5e52023-10-08 20:27:43 -070052 install -m 644 ${WORKONSRC}bootloader_r3.0.0_build6773_uartboot_921600.pkg ${D}/data/gnss_update
lichengzhangd1b79a72023-10-09 03:15:57 -070053 install -m 644 ${WORKONSRC}agps.conf ${D}/data/gnss_update
lichengzhange48d5e52023-10-08 20:27:43 -070054 ln -sf ./UC6228CI-R3.2.10.100Build8019_mfg.pkg ${D}/data/gnss_update/firmware.pkg
55 ln -sf ./bootloader_r3.0.0_build6773_uartboot_921600.pkg ${D}/data/gnss_update/bootloader.pkg
lichengzhang29fc2fa2023-08-02 23:20:48 -070056 fi
57}
58
59addtask bachclean
60do_bachclean () {
61 oe_runmake clean
62}