xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 1 | DESCRIPTION = "bsp_test" |
xf.li | f233062 | 2024-05-15 18:17:18 -0700 | [diff] [blame^] | 2 | DEPENDS = "libnvram libbsp" |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 3 | SECTION = "app" |
| 4 | LICENSE = "zte" |
| 5 | PV = "1.0.0" |
| 6 | PR = "r0" |
| 7 | |
| 8 | CLASS_COM = " \ |
| 9 | ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \ |
| 10 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ |
| 11 | " |
| 12 | inherit ${CLASS_COM} |
| 13 | |
| 14 | #配置code路径信息。 |
| 15 | FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}:" |
| 16 | SRC_URI = " \ |
| 17 | file://test/bsp_test \ |
| 18 | " |
| 19 | |
| 20 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808" |
| 21 | S = "${WORKDIR}" |
| 22 | S_SRC_PATH = "${S}/test/bsp_test" |
| 23 | #引用公用头文件和编译选项。 |
| 24 | include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc |
| 25 | include ${BSPDIR}/sources/meta-zxic/conf/pub.inc |
| 26 | CFLAGS_append = "${ZXIC_EXTRA_CFLAGS}" |
| 27 | |
| 28 | #inherit autotools pkgconfig systemd |
| 29 | |
| 30 | do_compile() { |
| 31 | make -C ${S_SRC_PATH} |
| 32 | } |
| 33 | |
| 34 | do_install () { |
| 35 | install -d ${D}${bindir}/ |
| 36 | install -m 0755 ${S_SRC_PATH}/bsp_test ${D}${bindir}/ |
| 37 | |
| 38 | #install elfs |
| 39 | install -d ${ELFS-PATH}/ |
| 40 | install -m 0755 ${S_SRC_PATH}/bsp_test ${ELFS-PATH}/ |
| 41 | } |
| 42 | |
| 43 | do_cleanlibs () { |
| 44 | rm -fr ${ELFS-PATH}/bsp_test |
| 45 | } |
| 46 | |
| 47 | addtask cleanlibs after do_clean before do_cleansstate |
| 48 | |
| 49 | #rootfs包含的文件 |
| 50 | FILES_${PN} = "\ |
| 51 | ${bindir}/ \ |
| 52 | " |