From 2776e2de4e27458bb7e02d8ed1a01f31ef9bf888 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 23 Aug 2006 18:11:51 -0400 Subject: ENH: add i386 toolchain and some minor improvement of the comments --- Modules/UseEcos.cmake | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'Modules/UseEcos.cmake') diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake index bd00fe8b6d..7979831005 100644 --- a/Modules/UseEcos.cmake +++ b/Modules/UseEcos.cmake @@ -1,10 +1,13 @@ # - This module defines variables and macros required to build eCos application. # This file contains the following macros: # ECOS_ADD_INCLUDE_DIRECTORIES() - add the eCos include dirs +# ECOS_ADD_EXECUTABLE(name source1 ... sourceN ) - create an eCos executable +# ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN ) - adjusts the path of the source files and puts the result into VAR +# +# Macros for selecting the toolchain: # ECOS_USE_ARM_ELF_TOOLS() - enable the ARM ELF toolchain for the directory where it is called +# ECOS_USE_I386_ELF_TOOLS() - enable the i386 ELF toolchain for the directory where it is called # ECOS_USE_PPC_EABI_TOOLS() - enable the PowerPC toolchain for the directory where it is called -# ECOS_ADD_EXECUTABLE(name source1 ... sourceN ) - create an executable for eCos -# ECOS_ADJUST_DIRECTORY(source1 ... sourceN ) # # It contains the following variables: # ECOS_DEFINITIONS @@ -78,6 +81,21 @@ MACRO (ECOS_USE_PPC_EABI_TOOLS) SET(ECOS_ARCH_PREFIX "powerpc-eabi-") ENDMACRO (ECOS_USE_PPC_EABI_TOOLS) +#usage: ECOS_USE_I386_ELF_TOOLS() +MACRO (ECOS_USE_I386_ELF_TOOLS) + SET(CMAKE_CXX_COMPILER "i386-elf-c++") + SET(CMAKE_COMPILER_IS_GNUCXX 1) + SET(CMAKE_C_COMPILER "i386-elf-gcc") + SET(CMAKE_AR "i386-elf-ar") + SET(CMAKE_RANLIB "i386-elf-ranlib") +#for linking + SET(ECOS_LD_MCPU "") +#for compiling + ADD_DEFINITIONS() +#for the obj-tools + SET(ECOS_ARCH_PREFIX "i386-elf-") +ENDMACRO (ECOS_USE_I386_ELF_TOOLS) + #since the actual sources are located one level upwards #a "../" has to be prepended in front of every source file -- cgit v1.2.1