diff options
author | Yann E. MORIN <yann.morin.1998@anciens.enib.fr> | 2010-03-26 20:46:37 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-03-31 10:53:12 +0200 |
commit | 26b44b2b0272e7f51415942c72328e9a3dbe400a (patch) | |
tree | 1f0d434000130434f36abd8b5330946dbca5cd0e /package/Makefile.in | |
parent | 3b7aee23f2ab732f06b8a090ca002fb102d547ee (diff) |
toolchain: prepare for more than two alternatives
Lay down the path to add more than two toolchain kinds:
- check the type of toolchain as:
ifeq (toolchain_buildroot,y)
blabla buildroot-specific
else ifeq (toolchain_external,y)
blabla external-specific
endif
- prefer using positive checks, a-la:
ifeq (foo,y)
instead of:
ifneq (bar,y)
(where foo and bar are mutually exclusive)
- have the toolchain_buildroot case always appear first
- gettext is handled differently, because we want to add an option
only if not using the buildroot toolchain, hence we use ifneq.
Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Acked-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/Makefile.in')
-rw-r--r-- | package/Makefile.in | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/package/Makefile.in b/package/Makefile.in index 1e412a653..2bd364013 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -88,9 +88,8 @@ endif TARGET_CXXFLAGS=$(TARGET_CFLAGS) -# else it's an external toolchain ######################################################################### -else +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) --sysroot $(STAGING_DIR)/ TARGET_CXXFLAGS=$(TARGET_CFLAGS) TARGET_LDFLAGS=--sysroot $(STAGING_DIR)/ @@ -115,7 +114,7 @@ GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX) TARGET_CROSS=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)- KERNEL_CROSS=$(TARGET_CROSS) -else +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) TOOLCHAIN_EXTERNAL_PREFIX:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)) TOOLCHAIN_EXTERNAL_PATH:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) TOOLCHAIN_DIR=$(BASE_DIR)/toolchain @@ -139,10 +138,10 @@ TARGET_NM=$(TARGET_CROSS)nm TARGET_RANLIB=$(TARGET_CROSS)ranlib TARGET_OBJCOPY=$(TARGET_CROSS)objcopy TARGET_OBJDUMP=$(TARGET_CROSS)objdump -ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) -TARGET_LDCONFIG=/sbin/ldconfig -else +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TARGET_LDCONFIG=/sbin/ldconfig endif ifeq ($(BR2_STRIP_strip),y) STRIP_DISCARD_ALL:=--discard-all |