Skip to content

Instantly share code, notes, and snippets.

@Charles-Hsu
Created January 9, 2017 04:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Charles-Hsu/6939500c1d08ea66e16378527f5eedd1 to your computer and use it in GitHub Desktop.
Save Charles-Hsu/6939500c1d08ea66e16378527f5eedd1 to your computer and use it in GitHub Desktop.
Yocto static library
# This file was derived from the 'Hello World!' example recipe in the
# Yocto Project Development Manual.
#
SUMMARY = "Simple Library on Yocto"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"
SRC_URI = " \
file://crypto_sw_bbm.tar.gz \
file://crypto_sw_crypto.tar.gz \
file://crypto_sw_sdu.tar.gz \
file://vicom-api.tar.gz \
"
S = "${WORKDIR}/"
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-staticdev"
RDEPENDS_${PN}-staticdev = ""
RDEPENDS_${PN}-dev = ""
RDEPENDS_${PN}-dbg = ""
do_compile() {
${CC} -c enet_default.c -o enet_default.o
${CC} -c running_path.c -o running_path.o
${CC} -c utils.c -o utils.o
${CC} -c vicom-api.c -o vicom-api.o -DYOCTO
${CC} -c vicom-network-api.c -o vicom-network-api.o
${AR} rcs libvicom-api.a enet_default.o running_path.o \
utils.o vicom-api.o vicom-network-api.o
}
do_install() {
install -d ${D}${libdir}
install -m 0644 libvicom-api.a ${D}${libdir}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment