linux-gumstix: Call uboot-mkimage and just use normal hook for DEPENDS
[openembedded.git] / classes / canadian-sdk.bbclass
blob94db57796eb118994bbbeac1463c0acd11078d7d
2 # Note this class is deprecated and replaced by crosssdk.bbclass
5 # Canadian SDK packages are built either explicitly by the user,
6 # or indirectly via dependency.  No need to be in 'world'.
7 EXCLUDE_FROM_WORLD = "1"
9 inherit canadian
11 PACKAGE_ARCH = "${SDK_SYS}-sdk-${OLD_PACKAGE_ARCH}"
12 BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
14 HOST_ARCH = "${SDK_ARCH}"
15 HOST_VENDOR = "${SDK_VENDOR}"
16 HOST_OS = "${SDK_OS}"
17 HOST_PREFIX = "${SDK_PREFIX}"
18 HOST_CC_ARCH = "${SDK_CC_ARCH}"
19 HOST_EXEEXT = "${SDK_EXEEXT}"
21 CPPFLAGS = "${SDK_CPPFLAGS}"
22 CFLAGS = "${SDK_CFLAGS}"
23 CXXFLAGS = "${SDK_CFLAGS}"
24 LDFLAGS = "${SDK_LDFLAGS}"
26 DEPENDS_prepend = "virtual/${HOST_PREFIX}binutils virtual/${HOST_PREFIX}gcc "
28 # On mingw systems we want to have the real sysroot default to c:/... and
29 # assume that the default install will be on the C drive.  This can be changed
30 # by setting SDK_REALPATH_MINGW.
31 SDK_REALPATH = "${SDK_PATH}"
32 SDK_REALPATH_MINGW ?= "C:"
34 # Path prefixes
35 prefix = "${SDK_PATH}"
36 exec_prefix = "${prefix}"
37 base_prefix = "${prefix}"
39 # Base paths
40 export base_bindir = "${prefix}/bin"
41 export base_sbindir = "${prefix}/bin"
42 export base_libdir = "${prefix}/lib"
44 # Architecture independent paths
45 export datadir = "${prefix}/share"
46 export sysconfdir = "${prefix}/etc"
47 export sharedstatedir = "${datadir}/com"
48 export localstatedir = "${prefix}/var"
49 export infodir = "${datadir}/info"
50 export mandir = "${datadir}/man"
51 export docdir = "${datadir}/doc"
52 export servicedir = "${prefix}/srv"
54 # Architecture dependent paths
55 export bindir = "${prefix}/bin"
56 export sbindir = "${prefix}/bin"
57 export libexecdir = "${prefix}/libexec"
58 export libdir = "${prefix}/lib"
59 export includedir = "${prefix}/include"
60 export oldincludedir = "${prefix}/include"
62 export dollar = "$"
64 canadian_sdk_runconf() {
65         # modified oe_runconf()
66         # 1. Override prefix with SDK_REALPATH
67         # 2. Pass '${prefix}' to configure, to allow for prefix override
68         # 3. But don't do that for infodir and mandir, as they will
69         #    break gcc makefiles for windows/dos SDK_REALPATH
70         if [ -x ${S}/configure ] ; then
71                 cfgcmd="${S}/configure \
72                     --build=${BUILD_SYS} \
73                     --host=${HOST_SYS} \
74                     --target=${TARGET_SYS} \
75                     --prefix=${SDK_REALPATH} \
76                     --exec-prefix=$dollar{prefix} \
77                     --bindir=$dollar{prefix}/bin \
78                     --sbindir=$dollar{prefix}/bin \
79                     --libexecdir=$dollar{prefix}/libexec \
80                     --datadir=$dollar{prefix}/share \
81                     --sysconfdir=$dollar{prefix}/etc \
82                     --sharedstatedir=$dollar{prefix}/com \
83                     --localstatedir=$dollar{prefix}/var \
84                     --libdir=$dollar{prefix}/lib \
85                     --includedir=$dollar{prefix}/include \
86                     --oldincludedir=$dollar{prefix}/include \
87                     --infodir=${prefix}/share/info \
88                     --mandir=${prefix}/share/man \
89                     --enable-mainainer-mode \
90                     ${EXTRA_OECONF} \
91                     $@"
92                 oenote "Running $cfgcmd..."
93                 $cfgcmd || oefatal "oe_runconf failed"
94         else
95                 oefatal "no configure script found"
96         fi
99 FILES_${PN} = "${prefix}"
100 FILES_${PN}-dbg += "${prefix}/.debug \
101                     ${prefix}/bin/.debug \
102                    "