blob: 78eb4d2a40299e4884ddd5b2f243c1194c7d789c [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#Basic Configuration
2DESCRIPTION = "spmeta"
3SECTION = "base"
4LICENSE = "MediaTekProprietary"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
6MTK_SRC = "${TOPDIR}/../src/devtools/sp_meta"
7SP_PREFIX = "${STAGING_INCDIR}/install"
8LINUX_KERNEL = "linux-4.4"
9
10WORKONSRC = "${MTK_SRC}"
11BB_CFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -g"
12BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}"
13
14BB_INCLUDE_ADD = "-I${MTK_SRC}/common/inc \
15 -I${STAGING_DIR_HOST} \
16 -I${STAGING_INCDIR} \
17 "
18
19inherit deploy workonsrc
20
21#Parameters passed to do_compile()
22
23
24EXTRA_OEMAKE = "CROSS=${TARGET_PREFIX} \
25 PREFIX=${SP_PREFIX} \
26 PACKAGE_ARCH=${PACKAGE_ARCH} \
27 BB_INCLUDE_ADD=${BB_INCLUDE_ADD} \
28 BB_LDFLAGS_ADD=${BB_LDFLAGS_ADD} \
29 LINUX_KERNEL=${LINUX_KERNEL}"
30
31FILES_${PN} = "${base_libdir}/*.so\
32 ${base_bindir}\
33 ${base_sbindir}\
34 /mnt\
35 /tmp\
36 /etc\
37 /test"
38
39FILES_${PN}-dev = "${includedir}"
40
41FILES_${PN}-staticdev = "${base_libdir}/*.a"
42
43FILES_${PN}-doc = "/doc"
44
45FILES_${PN}-dbg = "/usr/src/debug \
46 ${base_bindir}/.debug \
47 ${base_libdir}/.debug \
48 ${base_sbindir}/.debug"
49
50#Skip strip check in QA test.
51INSANE_SKIP_${PN} += "already-stripped"
52
53
54do_compile () {
55 unset LDFLAGS
56 if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
57 oe_runmake all ROOT=${STAGING_DIR_HOST} CFLAGS="${BB_CFLAGS_ADD} -mhard-float"
58 else
59 oe_runmake all ROOT=${STAGING_DIR_HOST} CFLAGS="${BB_CFLAGS_ADD}"
60 fi
61}
62
63do_install () {
64 oe_runmake install ROOT=${D}
65
66 if [ -d "${D}/include" ]; then
67 install -d ${D}${includedir}
68 cp -af ${D}/include/* ${D}${includedir}
69 rm -rf ${D}/include
70 fi
71}
72inherit systemd
73SYSTEMD_PACKAGES = "${PN}"
74SYSTEMD_SERVICE_${PN} = "keymonitor.service"
75FILES_${PN} += "${systemd_unitdir}/system/keymonitor.service"
76do_install_append(){
77 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
78 install -d ${D}${systemd_unitdir}/system/
79 install -m 0644 ${B}/lib/systemd/system/keymonitor.service ${D}${systemd_unitdir}/system
80 fi
81}
82addtask bachclean
83do_bachclean () {
84 oe_runmake clean
85}