-ifeq "$(PASS)" "1"
- mkdir -pv /tools/ccache/bin
- ln -svf ../../bin/ccache /tools/ccache/bin/gcc
- ln -svf ../../bin/ccache /tools/ccache/bin/g++
- ln -svf ../../bin/ccache /tools/ccache/bin/cc
- ln -svf ../../bin/ccache /tools/ccache/bin/c++
- ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-gcc
- ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-g++
- ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-cc
- ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-c++
-endif
-
-ifeq "$(PASS)" "2"
- ln -svf ../../bin/ccache /tools/ccache/bin/$(BUILDTARGET)-gcc
- ln -svf ../../bin/ccache /tools/ccache/bin/$(BUILDTARGET)-g++
- ln -svf ../../bin/ccache /tools/ccache/bin/$(BUILDTARGET)-cc
- ln -svf ../../bin/ccache /tools/ccache/bin/$(BUILDTARGET)-c++
+ifeq "$(TOOLCHAIN)" "1"
+ ifeq "$(PASS)" "1"
+ mkdir -pv $(TOOLS_DIR)/ccache/bin
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/gcc
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/g++
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/cc
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/c++
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-gcc
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-g++
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-cc
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-c++
+ endif
+
+ ifeq "$(PASS)" "2"
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-gcc
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-g++
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-cc
+ ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-c++
+ endif