summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfig/binutils.kconfig35
-rw-r--r--mk/binutils.mk14
2 files changed, 27 insertions, 22 deletions
diff --git a/kconfig/binutils.kconfig b/kconfig/binutils.kconfig
index 19d9d1d..cfa6cd9 100644
--- a/kconfig/binutils.kconfig
+++ b/kconfig/binutils.kconfig
@@ -2,18 +2,19 @@
# Embtoolkit
# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE. All rights reserved.
#
-# This program is free software; you can distribute it and/or modify it
-# under the terms of the GNU General Public License
-# (Version 2 or later) published by the Free Software Foundation.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
################################################################################
#
# \file binutils.kconfig
@@ -29,20 +30,28 @@ choice
will use.
config EMBTK_BINUTILS_VERSION_2_20_1
bool "binutils-2.20.1"
+ select EMBTK_BINUTILS_PKG_IS_TARBZ2
config EMBTK_BINUTILS_VERSION_2_20
bool "binutils-2.20"
+ select EMBTK_BINUTILS_PKG_IS_TARBZ2
config EMBTK_BINUTILS_VERSION_2_19_1
bool "binutils-2.19.1"
+ select EMBTK_BINUTILS_PKG_IS_TARBZ2
select EMBTK_BINUTILS_NEED_PATCH
endchoice
-config EMBTK_BINUTILS_NEED_PATCH
- bool
-
config EMBTK_BINUTILS_VERSION_STRING
string
default "2.20.1" if EMBTK_BINUTILS_VERSION_2_20_1
default "2.20" if EMBTK_BINUTILS_VERSION_2_20
default "2.19.1" if EMBTK_BINUTILS_VERSION_2_19_1
+config EMBTK_BINUTILS_NEED_PATCH
+ bool
+config EMBTK_BINUTILS_NEED_AUTORECONF
+ bool
+config EMBTK_BINUTILS_PKG_IS_TARGZ
+ bool
+config EMBTK_BINUTILS_PKG_IS_TARBZ2
+ bool
diff --git a/mk/binutils.mk b/mk/binutils.mk
index 32575b8..5034b6a 100644
--- a/mk/binutils.mk
+++ b/mk/binutils.mk
@@ -23,10 +23,13 @@
# \date May 2009
################################################################################
-BINUTILS_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_BINUTILS_VERSION_STRING)))
+BINUTILS_NAME := binutils
+BINUTILS_VERSION := $(call EMBTK_GET_PKG_VERSION,BINUTILS)
BINUTILS_SITE := http://ftp.gnu.org/gnu/binutils
+BINUTILS_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
BINUTILS_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/binutils/$(BINUTILS_VERSION)
BINUTILS_PACKAGE := binutils-$(BINUTILS_VERSION).tar.bz2
+BINUTILS_SRC_DIR := $(TOOLS_BUILD)/binutils-$(BINUTILS_VERSION)
BINUTILS_BUILD_DIR := $(TOOLS_BUILD)/binutils
BINUTILS_MULTILIB := --disable-multilib
@@ -40,14 +43,7 @@ $(BINUTILS_BUILD_DIR)/.built: download_binutils \
@touch $@
download_binutils:
- @test -e $(DOWNLOAD_DIR)/$(BINUTILS_PACKAGE) || \
- wget -O $(DOWNLOAD_DIR)/$(BINUTILS_PACKAGE) \
- $(BINUTILS_SITE)/$(BINUTILS_PACKAGE)
-ifeq ($(CONFIG_EMBTK_BINUTILS_NEED_PATCH),y)
- @test -e $(DOWNLOAD_DIR)/binutils-$(BINUTILS_VERSION).patch || \
- wget -O $(DOWNLOAD_DIR)/binutils-$(BINUTILS_VERSION).patch \
- $(BINUTILS_PATCH_SITE)/binutils-$(BINUTILS_VERSION)-*.patch
-endif
+ $(call EMBTK_DOWNLOAD_PKG,BINUTILS)
$(BINUTILS_BUILD_DIR)/.decompressed:
@tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(BINUTILS_PACKAGE)