xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 1 | DESCRIPTION = "crc-api" |
| 2 | |
xf.li | f233062 | 2024-05-15 18:17:18 -0700 | [diff] [blame^] | 3 | DEPENDS = "libnvram libbsp" |
xf.li | 742dd02 | 2023-06-08 01:43:32 -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路径信息。 |
| 16 | FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/test:" |
| 17 | SRC_URI = " \ |
| 18 | file://crc_api \ |
| 19 | " |
| 20 | |
| 21 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808" |
| 22 | S = "${WORKDIR}" |
| 23 | |
| 24 | #引用公用头文件和编译选项。 |
| 25 | include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc |
| 26 | include ${BSPDIR}/sources/meta-zxic/conf/pub.inc |
| 27 | CFLAGS_append = "${ZXIC_EXTRA_CFLAGS}" |
| 28 | |
| 29 | #编译 |
| 30 | do_compile() { |
| 31 | make -C crc_api |
| 32 | } |
| 33 | |
| 34 | #库文件的安装 |
| 35 | do_install() { |
| 36 | install -d ${D}${bindir}/ |
| 37 | install -m 0755 ${S}/crc_api/crc_api ${D}${bindir}/ |
| 38 | |
| 39 | #install elfs |
| 40 | install -d ${ELFS-PATH}/ |
| 41 | install -m 0755 ${S}/crc_api/crc_api ${ELFS-PATH}/ |
| 42 | } |
| 43 | #清库 |
| 44 | do_cleanlibs () { |
| 45 | rm -fr ${ELFS-PATH}/crc_api |
| 46 | } |
| 47 | |
| 48 | addtask cleanlibs after do_clean before do_cleansstate |
| 49 | |
| 50 | #rootfs包含的文件 |
| 51 | FILES_${PN} = "\ |
| 52 | ${bindir}/ \ |
| 53 | " |