scripts/build/kernel/mingw32.sh
author Bart vdr Meulen <bartvdrmeulen@gmail.com>
Sun Jul 11 21:36:20 2010 +0200 (2010-07-11)
changeset 2017 f637b6c2162b
child 2084 2bcd716ca877
permissions -rw-r--r--
kernel: add mingw

Add the option to build a cross-compiler for kernel type 'mingw'.
The resulting cross-compiler can be used to build applications on a Linux host
that can be run on a Windows target.

Compiler is build using the mingwrt and w32-api packages aviable from the
MinGW project (http://sourceforge.net/projects/mingw).

The windows headers (w32-api package) are extracting with the kernel_headers
step The libraries and other headers from both packages are build and
installed in the various steps of libc

Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com>
[yann.morin.1998@anciens.enib.fr: fix kernel headers comment, don't "return 0"]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # This file declares functions to install the kernel headers for mingw
     2 # Copyright 2009 Bart vdr. Meulen
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 CT_DoKernelTupleValues() {
     6     CT_TARGET_KERNEL="mingw32"
     7     CT_TARGET_SYS=
     8 }
     9 
    10 do_kernel_get() {
    11     CT_GetFile "w32api-${CT_W32API_VERSION}-mingw32-src" \
    12         http://downloads.sourceforge.net/sourceforge/mingw
    13 }
    14 
    15 do_kernel_extract() {
    16     CT_Extract "w32api-${CT_W32API_VERSION}-mingw32-src"
    17 }
    18 
    19 do_kernel_headers() {
    20     CT_DoStep INFO "Installing kernel headers"
    21 
    22     mkdir -p "${CT_SYSROOT_DIR}/include"
    23     cp -r ${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/include \
    24           ${CT_SYSROOT_DIR}
    25 
    26     CT_EndStep
    27 }