5.2. Makefile-Based Projects

For Makefile-based projects, the cross-toolchain environment variables established by running the cross-toolchain environment setup script override any settings you might have in your Makefile. For example, if you had settings such as the following in your Makefile, the environment variables defined by the script would override them:

     CC=arm-poky-linux-gnueabi-gcc
     LD=arm-poky-linux-gnueabi-ld
     CFLAGS=”${CFLAGS} --sysroot=<sysroot-dir>”
     CXXFLAGS=”${CXXFLAGS} --sysroot=<sysroot-dir>”
        

Consequently, you should not set variables like CC and LD in your Makefile. For the list of variables set up by the cross-toolchain environment setup script, see the "Setting Up the Cross-Development Environment" section.