sdk.bbclass: Use variables from bitbake.conf (from Poky)
[vuplus_openembedded] / classes / sdk.bbclass
1 # SDK packages are built either explicitly by the user,
2 # or indirectly via dependency.  No need to be in 'world'.
3 EXCLUDE_FROM_WORLD = "1"
4
5 OLD_PACKAGE_ARCH := ${PACKAGE_ARCH}
6 PACKAGE_ARCH = "${BUILD_ARCH}-${OLD_PACKAGE_ARCH}-sdk"
7
8 HOST_ARCH = "${BUILD_ARCH}"
9 HOST_VENDOR = "${BUILD_VENDOR}"
10 HOST_OS = "${BUILD_OS}"
11 HOST_PREFIX = "${BUILD_PREFIX}"
12 HOST_CC_ARCH = "${BUILD_CC_ARCH}"
13
14 CPPFLAGS = "${BUILD_CPPFLAGS}"
15 CFLAGS = "${BUILD_CFLAGS}"
16 CXXFLAGS = "${BUILD_CFLAGS}"
17 LDFLAGS = "${BUILD_LDFLAGS}"
18
19 prefix = "${SDK_PREFIX}"
20 exec_prefix = "${prefix}"
21 base_prefix = "${exec_prefix}"
22
23 FILES_${PN} = "${prefix}"
24 FILES_${PN}-dbg += "${prefix}/bin/.debug \
25                     ${prefix}/sbin/.debug \
26                    "
27
28 sdk_ipk_do_indexes () {
29         set -x
30
31         ipkgarchs="${PACKAGE_ARCHS}"
32
33         if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
34                 touch ${DEPLOY_DIR_IPK}/Packages
35                 ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
36         fi
37
38         for arch in $ipkgarchs; do
39                 if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
40                         if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ ] ; then 
41                                 touch ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages
42                                 ipkg-make-index -r ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -p ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -l ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages.filelist -m ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/
43                         fi
44                 fi
45         done
46 }