dirs: $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
-$(BASE_TARGETS): dirs $(O)/toolchainfile.cmake
+$(BASE_TARGETS): dirs $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
$(BUILD_DIR)/buildroot-config/auto.conf: $(CONFIG_DIR)/.config
$(MAKE) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
world: prepare dirs dependencies $(BASE_TARGETS) $(TARGETS_ALL)
-$(O)/toolchainfile.cmake:
+$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
+ mkdir -p $(@D)
@echo -en "\
set(CMAKE_SYSTEM_NAME Linux)\n\
set(CMAKE_C_COMPILER $(TARGET_CC_NOCCACHE))\n\
(cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
- -DCMAKE_TOOLCHAIN_FILE="$$(BASE_DIR)/toolchainfile.cmake" \
+ -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
$$($$(PKG)_CONF_OPT) \
)