blob: 5c41b14689373739553db93861ee5aaa724d6392 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#Basic Configuration
2DESCRIPTION = "liblogger module implements the Android logger."
3SECTION = "base"
4LICENSE = "MediaTekProprietary"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
6DEPENDS = "custom"
7MTK_SRC = "${BACH_SRC}/liblogger"
8
9WORKONSRC = "${MTK_SRC}"
10#BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
11BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}"
12
13inherit deploy workonsrc
14
15#Parameters passed to do_compile()
16EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\
17 'PROJECT=${PROJ}'\
18 'ROOT=${STAGING_DIR_HOST}'\
19 'PLATFORM_CHIP=${PLATFORM_CHIP}'\
20 'LDFLAGS=${BB_LDFLAGS_ADD}'"
21
22FILES_${PN} = "${base_libdir}/*.so \
23 ${base_bindir}\
24 ${base_sbindir}\
25 ${bindir}\
26 /etc"
27
28FILES_${PN}-dev = "${includedir}/"
29
30FILES_${PN}-staticdev = "${base_libdir}/*.a"
31
32FILES_${PN}-doc = "/doc"
33
34
35do_compile () {
36 if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
37 oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float -D__REDIRECT_TO_SYSLOGD__"
38 elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
39 oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float -D__REDIRECT_TO_SYSLOGD__"
40 else
41 oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -D__REDIRECT_TO_SYSLOGD__"
42 fi
43}
44
45do_install () {
46 oe_runmake install ROOT=${D}
47
48 if [ -d "${WORKONSRC}" ]; then
49 #Since systemd.bbclass would delete the /etc/init.d DIR, we move the daemons from /etc/init.d to /usr/bin.
50 install -d ${D}${bindir}
51 install -m 0755 logcat/logcatd ${D}${bindir}/logcatd
52 fi
53
54 if [ -d "${D}/include" ]; then
55 install -d ${D}${includedir}
56 cp -af ${D}/include/* ${D}${includedir}/
57 rm -rf ${D}/include
58 fi
59
60
61}
62
63do_pack() {
64 oe_runmake pack_rootfs
65}
66
67addtask bachclean
68do_bachclean () {
69 oe_runmake clean
70}