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