mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 16:43:09 +02:00
add toolchain/download target
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4029 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
36551bb1f6
commit
14ace0ca94
@ -1,12 +1,14 @@
|
|||||||
# Main makefile for the toolchain
|
# Main makefile for the toolchain
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
TARGETS-y:=sed utils binutils gcc uClibc ipkg-utils libnotimpl
|
TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl
|
||||||
TARGETS-$(CONFIG_GDB) += gdb
|
TARGETS-$(CONFIG_GDB) += gdb
|
||||||
|
|
||||||
|
TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y))
|
||||||
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
|
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
|
||||||
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
|
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
|
||||||
|
|
||||||
all: install
|
all: install
|
||||||
|
download: $(TARGETS_DOWNLOAD)
|
||||||
install: $(TARGETS_INSTALL)
|
install: $(TARGETS_INSTALL)
|
||||||
clean: $(TARGETS_CLEAN)
|
clean: $(TARGETS_CLEAN)
|
||||||
|
|
||||||
@ -30,6 +32,9 @@ $(STAGING_DIR):
|
|||||||
$(TOOL_BUILD_DIR):
|
$(TOOL_BUILD_DIR):
|
||||||
@mkdir -p $@
|
@mkdir -p $@
|
||||||
|
|
||||||
|
%-source: FORCE
|
||||||
|
$(MAKE) -C $(patsubst %-source,%,$@) source
|
||||||
|
|
||||||
%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
|
%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
|
||||||
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
|
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
|
||||||
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
|
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
|
||||||
|
@ -13,14 +13,16 @@ SED_DIR1:=$(TOOL_BUILD_DIR)/sed-$(SED_VER)
|
|||||||
SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VER)
|
SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VER)
|
||||||
SED_BINARY:=sed/sed
|
SED_BINARY:=sed/sed
|
||||||
SED_TARGET_BINARY:=bin/sed
|
SED_TARGET_BINARY:=bin/sed
|
||||||
|
SED_MD5SUM:=928f0e06422f414091917401f1a834d0
|
||||||
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
|
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
|
||||||
SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64
|
SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64
|
||||||
endif
|
endif
|
||||||
HOST_SED_TARGET=$(shell ./sedcheck.sh)
|
HOST_SED_TARGET=$(shell ./sedcheck.sh)
|
||||||
|
DOWNLOAD_TARGET=$(shell ./sedcheck.sh)
|
||||||
|
|
||||||
$(DL_DIR)/$(SED_SOURCE):
|
$(DL_DIR)/$(SED_SOURCE):
|
||||||
mkdir -p $(DL_DIR)
|
mkdir -p $(DL_DIR)
|
||||||
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(SED_SOURCE) x $(SED_SITE)
|
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(SED_SOURCE) $(SED_MD5SUM) $(SED_SITE)
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
#
|
#
|
||||||
@ -65,7 +67,9 @@ use-sed-host-binary: FORCE
|
|||||||
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); \
|
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); \
|
||||||
ln -s $$SED $(STAGING_DIR)/$(SED_TARGET_BINARY)
|
ln -s $$SED $(STAGING_DIR)/$(SED_TARGET_BINARY)
|
||||||
|
|
||||||
source:
|
download-sed-binary: sed-$(SED_VER).tar.gz
|
||||||
|
|
||||||
|
source: $(DOWNLOAD_TARGET)
|
||||||
prepare:
|
prepare:
|
||||||
compile:
|
compile:
|
||||||
install: $(HOST_SED_TARGET)
|
install: $(HOST_SED_TARGET)
|
||||||
|
@ -11,11 +11,20 @@ fi;
|
|||||||
echo "HELLO" > .sedtest
|
echo "HELLO" > .sedtest
|
||||||
$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
|
$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
|
||||||
|
|
||||||
if [ $? != 0 ] ; then
|
case "$1" in
|
||||||
echo build-sed-host-binary
|
download)
|
||||||
else
|
if [ $? != 0 ] ; then
|
||||||
echo use-sed-host-binary
|
echo download-sed-binary
|
||||||
fi;
|
fi;
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
echo build-sed-host-binary
|
||||||
|
else
|
||||||
|
echo use-sed-host-binary
|
||||||
|
fi;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
rm -f .sedtest
|
rm -f .sedtest
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ ifeq ($(OS),Darwin)
|
|||||||
CFLAGS += -I./include
|
CFLAGS += -I./include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
source:
|
||||||
prepare: $(UTILS_BUILD_DIR)
|
prepare: $(UTILS_BUILD_DIR)
|
||||||
compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS))
|
compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS))
|
||||||
install: compile
|
install: compile
|
||||||
|
Loading…
Reference in New Issue
Block a user