+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+-include $(TOPDIR)/.config
+include $(TOPDIR)/include/verbose.mk
+
+export SHELL=/usr/bin/env bash -c '. $(TOPDIR)/include/shell.sh; eval "$$2"' --
+export BASH=$(shell which bash)
+
+ARCH:=$(strip $(subst ",, $(CONFIG_ARCH)))
+TARGET_OPTIMIZATION:=$(strip $(subst ",, $(CONFIG_TARGET_OPTIMIZATION)))
+WGET:=$(strip $(subst ",, $(CONFIG_WGET)))
+#"))"))")) # fix vim's broken syntax highlighting
+
+OPTIMIZE_FOR_CPU:=$(ARCH)
+
+# DIRECTORIES #
+
+DL_DIR:=$(TOPDIR)/dl
+INCLUDE_DIR:=$(TOPDIR)/include
+SCRIPT_DIR:=$(TOPDIR)/scripts
+TOOL_BUILD_DIR:=$(TOPDIR)/tool_build
+TOOLCHAIN_BUILD_DIR:=$(TOPDIR)/toolchain_build_$(ARCH)
+STAGING_DIR:=$(TOPDIR)/staging_dir_$(ARCH)
+BIN_DIR:=$(TOPDIR)/bin
+PACKAGE_DIR:=$(BIN_DIR)/packages
+IPKG_TARGET_DIR:=$(PACKAGE_DIR)
+BUILD_DIR:=$(TOPDIR)/build_$(ARCH)
+TMP_DIR:=$(BUILD_DIR)/tmp
+STAMP_DIR:=$(BUILD_DIR)/stamp
+TARGET_DIR:=$(BUILD_DIR)/root
+IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg