From 8607002f86110c696f301ee3eaaccf58b030dfdf Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Mon, 11 Jun 2012 00:27:38 +0800 Subject: cmake Toolchain file for any OpenWRT Target (x86, mips, AVR32, ARM, etc.) --- cmake/Toolchain-Linux-openwrt-mips.cmake.sample | 10 ---------- cmake/Toolchain-OpenWRT-ANY.cmake | 13 +++++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 cmake/Toolchain-Linux-openwrt-mips.cmake.sample create mode 100644 cmake/Toolchain-OpenWRT-ANY.cmake diff --git a/cmake/Toolchain-Linux-openwrt-mips.cmake.sample b/cmake/Toolchain-Linux-openwrt-mips.cmake.sample deleted file mode 100644 index 73ec9874b..000000000 --- a/cmake/Toolchain-Linux-openwrt-mips.cmake.sample +++ /dev/null @@ -1,10 +0,0 @@ -# Toolchain file for building with OpenWRT Toolchain for MIPS. -# This is a preliminary version for mips outside of the buildroot-ng. -# The next version should be target independent. -# Further improvements: -# - use ENV variables in OpenWRT toolchain (like HOSTCC, TARGET_CC) -# - set flags properly for host and target - -set(CMAKE_SYSTEM_NAME Linux) -set(TOOLCHAIN_PREFIX mips-openwrt-linux) -set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) diff --git a/cmake/Toolchain-OpenWRT-ANY.cmake b/cmake/Toolchain-OpenWRT-ANY.cmake new file mode 100644 index 000000000..888c51ebe --- /dev/null +++ b/cmake/Toolchain-OpenWRT-ANY.cmake @@ -0,0 +1,13 @@ +# Toolchain file for building with OpenWRT Toolchain for ANY OpenWRT Target. +# Following prequisition are necessary: +# - latest cmake version +# - mruby OpenWRT Package file (not yet in distribution) + +# Switch to Cross Compile by setting the system name +SET(CMAKE_SYSTEM_NAME Linux) + +# We show CMAKE the compiler, the rest will be guessed by the Toolchain +SET(CMAKE_C_COMPILER "$ENV{OPENWRT_TOOLCHAIN}/bin/$ENV{OPENWRT_TARGETCC}") + +# We define an own release flag so that we can adapt the optimal C_FLAGS +SET(CMAKE_C_FLAGS_OPENWRT "$ENV{OPENWRT_TARGETFLAGS}") -- cgit v1.2.3