summaryrefslogtreecommitdiffstats
path: root/package/Makefile.in
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-02-06 18:19:38 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-02-06 18:19:38 +0000
commit02f71aab47835e7220e2b1039bcda4d0c5657db0 (patch)
treec4a14c8fb83fdec69a34065d93777e9960ea0831 /package/Makefile.in
parent4cdc4206218e8e2ed3bc5a31e2b5e157ec43f67c (diff)
downloadbuildroot-novena-02f71aab47835e7220e2b1039bcda4d0c5657db0.tar.gz
buildroot-novena-02f71aab47835e7220e2b1039bcda4d0c5657db0.zip
Support building using an external toolchain. Questions to the mailing list and all other comments to <biteme@devnull.com>.
Diffstat (limited to 'package/Makefile.in')
-rw-r--r--package/Makefile.in21
1 files changed, 20 insertions, 1 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 531f8de1f..37b3b71fb 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -19,7 +19,12 @@ TAR_OPTIONS=$(subst ",, $(BR2_TAR_OPTIONS)) -xf
#")
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
+else
+TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) -I$(STAGING_DIR)/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include
+TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
+endif
HOSTCC:=gcc
HOSTCXX:=g++
@@ -44,13 +49,14 @@ endif
#PATCH_DIR=$(BASE_DIR)/sources/patches
BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
TARGET_DIR:=$(BUILD_DIR)/root
-TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX)))
#"))
STAGING_DIR:=$(strip $(subst ",, $(BR2_STAGING_DIR)))
#"))
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
+TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
# Quotes are needed for spaces et al in path components.
TARGET_PATH="$(STAGING_DIR)/bin:$(TOOL_BUILD_DIR)/bin:$(PATH)"
@@ -59,6 +65,19 @@ REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
KERNEL_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)-
TARGET_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)-
+else
+TOOLCHAIN_EXTERNAL_PREFIX:=$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_PREFIX)))
+#"))
+TOOLCHAIN_EXTERNAL_PATH:=$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_PATH)))
+#"))
+TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX)
+TARGET_PATH="$(STAGING_DIR)/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)"
+IMAGE:=$(BASE_DIR)/rootfs.$(TOOLCHAIN_EXTERNAL_PREFIX)
+REAL_GNU_TARGET_NAME=$(TOOLCHAIN_EXTERNAL_PREFIX)
+GNU_TARGET_NAME=$(TOOLCHAIN_EXTERNAL_PREFIX)
+KERNEL_CROSS=$(TOOLCHAIN_EXTERNAL_PATH)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
+TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_PATH)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
+endif
TARGET_CC=$(TARGET_CROSS)gcc
TARGET_CXX=$(TARGET_CROSS)g++
TARGET_RANLIB=$(TARGET_CROSS)ranlib