scripts/build/tools/200-sstrip.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Jan 13 20:46:01 2010 +0100 (2010-01-13)
changeset 1732 6b2ae7804c6f
parent 1334 f37bf01a94a3
permissions -rw-r--r--
debug/gdb: staticaly link to ncurses for the native gdb

Staticaly link the native gdb (the one that runs on the target,
not the cross one that runs on the host) to ncurses.
     1 # This will build and install sstrip to run on host and sstrip target files
     2 
     3 case "${CT_SSTRIP_FROM}" in
     4     ELFkickers)
     5         do_tools_sstrip_get() {
     6             CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"     \
     7                        http://www.muppetlabs.com/~breadbox/pub/software
     8         }
     9         do_tools_sstrip_extract() {
    10             CT_Extract "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
    11             CT_Patch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
    12         }
    13         do_tools_sstrip_build() {
    14             CT_DoStep INFO "Installing sstrip"
    15             CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"   \
    16                                     "${CT_BUILD_DIR}/build-strip"
    17             cd "${CT_BUILD_DIR}/build-strip"
    18 
    19             CT_DoLog EXTRA "Building sstrip"
    20             CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
    21             
    22             CT_DoLog EXTRA "Installing sstrip"
    23             CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    24 
    25             CT_EndStep
    26         }
    27     ;;
    28 
    29     buildroot)
    30         do_tools_sstrip_get() {
    31             CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
    32         }
    33         do_tools_sstrip_extract() {
    34             # We leave the sstrip maintenance to the buildroot people:
    35             # -> any fix-up goes directly there
    36             # -> we don't have patches for it
    37             # -> we don't need to patch it
    38             # -> just create a directory in src/, and copy it there.
    39             CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
    40             CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
    41         }
    42         do_tools_sstrip_build() {
    43             CT_DoStep INFO "Installing sstrip"
    44             mkdir -p "${CT_BUILD_DIR}/build-sstrip"
    45             cd "${CT_BUILD_DIR}/build-sstrip"
    46 
    47             CT_DoLog EXTRA "Building sstrip"
    48             CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
    49 
    50             CT_DoLog EXTRA "Installing sstrip"
    51             CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    52 
    53             CT_EndStep
    54         }
    55     ;;
    56 
    57     *)  do_tools_sstrip_get() {
    58             :
    59         }
    60         do_tools_sstrip_extract() {
    61             :
    62         }
    63         do_tools_sstrip_build() {
    64             :
    65         }
    66     ;;
    67 esac