lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | DESCRIPTION = "zxic-debug" |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 2 | #zxic-debug依赖libnvram库 |
| 3 | DEPENDS = "libnvram" |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 4 | SECTION = "app" |
| 5 | LICENSE = "zte" |
| 6 | PV = "1.0.0" |
| 7 | PR = "r0" |
| 8 | |
| 9 | CLASS_COM = " \ |
| 10 | ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \ |
| 11 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ |
| 12 | " |
| 13 | inherit ${CLASS_COM} |
| 14 | |
| 15 | #配置code路径信息。 |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 16 | FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:" |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 17 | SRC_URI = " \ |
| 18 | file://zxic_debug \ |
| 19 | ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://zxic_debug.sysvinit","", d)} \ |
| 20 | " |
| 21 | |
| 22 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808" |
| 23 | S = "${WORKDIR}" |
| 24 | |
| 25 | #引用公用头文件和编译选项。 |
| 26 | include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc |
| 27 | include ${BSPDIR}/sources/meta-zxic/conf/pub.inc |
| 28 | CFLAGS_append = "${ZXIC_EXTRA_CFLAGS}" |
| 29 | |
| 30 | #编译 |
| 31 | do_compile() { |
| 32 | make -C zxic_debug |
| 33 | } |
| 34 | |
| 35 | #库文件的安装 |
| 36 | do_install() { |
| 37 | install -d ${D}${bindir}/ |
| 38 | install -m 0755 ${S}/zxic_debug/zxic_debug ${D}${bindir}/ |
| 39 | |
| 40 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
| 41 | install -Dm 0755 ${WORKDIR}/zxic_debug.sysvinit ${D}${sysconfdir}/init.d/zxic_debug |
| 42 | install -d ${D}${sysconfdir}/rcS.d |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 43 | ln -s ../init.d/zxic_debug ${D}${sysconfdir}/rcS.d/S90zxic_debug |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 44 | fi |
| 45 | |
| 46 | #install elfs |
| 47 | install -d ${ELFS-PATH}/ |
| 48 | install -m 0755 ${S}/zxic_debug/zxic_debug ${ELFS-PATH}/ |
| 49 | } |
| 50 | #清库 |
| 51 | do_cleanlibs () { |
| 52 | rm -fr ${ELFS-PATH}/zxic_debug |
| 53 | } |
| 54 | |
| 55 | addtask cleanlibs after do_clean before do_cleansstate |
| 56 | |
| 57 | #rootfs包含的文件 |
| 58 | FILES_${PN} = "\ |
| 59 | ${bindir}/ \ |
| 60 | ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \ |
| 61 | " |