1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-23 23:46:16 +02:00

move tools from toolchain/ to tools/

git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4866 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2006-09-27 14:06:46 +00:00
parent f4e092f9df
commit 44af1866aa
31 changed files with 94 additions and 29 deletions

View File

@ -85,6 +85,9 @@ package/%: .pkginfo FORCE
target/%: .pkginfo FORCE
$(MAKE) -C target $(patsubst target/%,%,$@)
tools/%: FORCE
$(MAKE) -C tools $(patsubst tools/%,%,$@)
toolchain/%: FORCE
$(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
@ -108,11 +111,13 @@ toolchain/%: FORCE
prereq: .prereq-build .prereq-packages FORCE
download: .config FORCE
$(MAKE) tools/download
$(MAKE) toolchain/download
$(MAKE) package/download
$(MAKE) target/download
world: .config FORCE
$(MAKE) tools/install
$(MAKE) toolchain/install
$(MAKE) target/compile
$(MAKE) package/compile
@ -124,7 +129,7 @@ clean: FORCE
rm -rf build_* bin
dirclean: clean
rm -rf staging_dir_* toolchain_build_*
rm -rf staging_dir_* toolchain_build_* tool_build
distclean: dirclean config-clean
rm -rf dl .*config* .pkg* .prereq

View File

@ -22,7 +22,8 @@ OPTIMIZE_FOR_CPU:=$(ARCH)
DL_DIR:=$(TOPDIR)/dl
INCLUDE_DIR:=$(TOPDIR)/include
SCRIPT_DIR:=$(TOPDIR)/scripts
TOOL_BUILD_DIR:=$(TOPDIR)/toolchain_build_$(ARCH)
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
@ -47,7 +48,7 @@ TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)
export PATH:=$(TARGET_PATH)
LINUX_DIR:=$(BUILD_DIR)/linux
LINUX_HEADERS_DIR:=$(TOOL_BUILD_DIR)/linux
LINUX_HEADERS_DIR:=$(TOOLCHAIN_BUILD_DIR)/linux
# APPLICATIONS #
HOSTCC:=gcc

View File

@ -7,13 +7,12 @@
# Main makefile for the toolchain
#
include $(TOPDIR)/rules.mk
TARGETS-y:=sed kernel-headers sstrip
TARGETS-y:=kernel-headers libnotimpl
TARGETS-$(CONFIG_GDB) += gdb
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
TARGETS-y+=binutils gcc uClibc
endif
TARGETS-y+=ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma mkimage
TARGETS-$(CONFIG_GDB) += gdb
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
@ -24,15 +23,14 @@ download: $(TARGETS_DOWNLOAD)
install: $(TARGETS_INSTALL)
clean: $(TARGETS_CLEAN)
kernel-headers-prepare: sed-install
uClibc-prepare: kernel-headers-prepare sstrip-install
uClibc-prepare: kernel-headers-prepare
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
binutils-prepare: uClibc-prepare
gcc-prepare: binutils-install
uClibc-compile: gcc-compile
libnotimpl-compile: gcc-install
endif
gcc-install: uClibc-install
squashfs-compile: lzma-install
TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles
@ -45,13 +43,13 @@ $(STAGING_DIR):
@mkdir -p $@/$(REAL_GNU_TARGET_NAME)
@ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib
$(TOOL_BUILD_DIR):
$(TOOLCHAIN_BUILD_DIR):
@mkdir -p $@
%-download: FORCE
$(MAKE) -C $(patsubst %-download,%,$@) download
%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOLCHAIN_BUILD_DIR) FORCE
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
}

View File

@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
PKG_MD5SUM:=unknown
PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_CAT:=bzcat
include $(INCLUDE_DIR)/host-build.mk

View File

@ -30,7 +30,7 @@ PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VER
ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION)
PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/gcc-$(PKG_VERSION)
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)
TARGET_LANGUAGES:=c
ifeq ($(CONFIG_INSTALL_LIBSTDCPP),y)
@ -42,8 +42,8 @@ endif
include $(INCLUDE_DIR)/host-build.mk
BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-$(PKG_VERSION)-initial
BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-$(PKG_VERSION)-final
BUILD_DIR1:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)-initial
BUILD_DIR2:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)-final
define Stage1/Configure
@ -56,7 +56,7 @@ define Stage1/Configure
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=c \
--disable-shared \
--with-sysroot=$(TOOL_BUILD_DIR)/uClibc_dev/ \
--with-sysroot=$(TOOLCHAIN_BUILD_DIR)/uClibc_dev/ \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \

View File

@ -14,7 +14,7 @@ PKG_MD5SUM:=05b928f41fa5b482e49ca2c24762a0ae
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/gdb
PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/host-build.mk

View File

@ -17,7 +17,7 @@ PKG_SOURCE_URL= \
http://www.kernel.org/pub/linux/kernel/v2.4
PKG_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/linux-$(PKG_VERSION)
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/linux-$(PKG_VERSION)
include $(INCLUDE_DIR)/host-build.mk
@ -30,8 +30,8 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
)
define Build/Prepare
mkdir -p $(TOOL_BUILD_DIR)
bzcat $(DL_DIR)/$(PKG_SOURCE) | tar --wildcards -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \
mkdir -p $(TOOLCHAIN_BUILD_DIR)
bzcat $(DL_DIR)/$(PKG_SOURCE) | tar --wildcards -C $(TOOLCHAIN_BUILD_DIR) $(TAR_OPTIONS) - \
linux-$(PKG_VERSION)/include \
linux-$(PKG_VERSION)/Makefile \
linux-$(PKG_VERSION)/Rules.make \

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libnotimpl
PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/libnotimpl
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/libnotimpl
include $(INCLUDE_DIR)/host-build.mk

View File

@ -15,7 +15,7 @@ PKG_SOURCE_URL:=http://www.uclibc.org/downloads
PKG_MD5SUM:=1ada58d919a82561061e4741fb6abd29
PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(PKG_VERSION)
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/uClibc-$(PKG_VERSION)
include $(INCLUDE_DIR)/host-build.mk
@ -52,13 +52,13 @@ endif
ifeq ($(CONFIG_SOFT_FLOAT),y)
$(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(PKG_BUILD_DIR)/.config
endif
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib
mkdir -p $(TOOLCHAIN_BUILD_DIR)/uClibc_dev/usr/include
mkdir -p $(TOOLCHAIN_BUILD_DIR)/uClibc_dev/usr/lib
mkdir -p $(TOOLCHAIN_BUILD_DIR)/uClibc_dev/lib
PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
PREFIX=$(TOOLCHAIN_BUILD_DIR)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
RUNTIME_PREFIX=$(TOOLCHAIN_BUILD_DIR)/uClibc_dev/ \
HOSTCC="$(HOSTCC)" \
CPU_CFLAGS="$(TARGET_CFLAGS)" \
pregen install_dev;
@ -92,7 +92,7 @@ define Build/Install
endef
define Build/Clean
rm -rf $(PKG_BUILD_DIR) $(TOOL_BUILD_DIR)/uClibc_dev
rm -rf $(PKG_BUILD_DIR) $(TOOLCHAIN_BUILD_DIR)/uClibc_dev
endef
$(eval $(call HostBuild))

61
tools/Makefile Normal file
View File

@ -0,0 +1,61 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Main makefile for the host tools
#
include $(TOPDIR)/rules.mk
TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
all: install
download: $(TARGETS_DOWNLOAD)
install: $(TARGETS_INSTALL)
clean: $(TARGETS_CLEAN)
squashfs-compile: lzma-install
TOOL_STAMP_DIR:=$(STAGING_DIR)/stampfiles
$(TOOL_STAMP_DIR):
mkdir -p $@
$(STAGING_DIR):
@mkdir -p $@/lib
@mkdir -p $@/include
@mkdir -p $@/$(REAL_GNU_TARGET_NAME)
@ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib
$(TOOL_BUILD_DIR):
@mkdir -p $@
%-download: FORCE
$(MAKE) -C $(patsubst %-download,%,$@) download
%-prepare: $(TOOL_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
@[ -f $(TOOL_STAMP_DIR)/.tool_$@ ] || { \
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
}
@touch $(TOOL_STAMP_DIR)/.tool_$@
%-compile: %-prepare
@[ -f $(TOOL_STAMP_DIR)/.tool_$@ ] || { \
$(MAKE) -C $(patsubst %-compile,%,$@) compile; \
}
@touch $(TOOL_STAMP_DIR)/.tool_$@
%-install: %-compile
@[ -f $(TOOL_STAMP_DIR)/.tool_$@ ] || { \
$(MAKE) -C $(patsubst %-install,%,$@) install; \
}
@touch $(TOOL_STAMP_DIR)/.tool_$@
%-clean: FORCE
@$(MAKE) -C $(patsubst %-clean,%,$@) clean
@rm -f $(TOOL_STAMP_DIR)/.tool_$(patsubst %-clean,%,$@)-*