2007-08-22 13:47:22 +02:00
|
|
|
ifndef MAKE
|
2007-07-17 14:09:07 +02:00
|
|
|
MAKE:=make
|
2007-01-30 18:33:53 +01:00
|
|
|
endif
|
2007-07-17 14:09:07 +02:00
|
|
|
ifndef HOSTMAKE
|
|
|
|
HOSTMAKE=$(MAKE)
|
|
|
|
endif
|
2009-01-01 22:20:35 +01:00
|
|
|
HOSTMAKE :=$(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make)
|
2007-07-17 14:09:07 +02:00
|
|
|
|
2008-07-11 15:43:59 +02:00
|
|
|
MAKE1:=$(HOSTMAKE) -j1
|
|
|
|
MAKE:=$(HOSTMAKE) -j$(BR2_JLEVEL)
|
2008-07-01 15:30:26 +02:00
|
|
|
|
2008-03-12 14:07:10 +01:00
|
|
|
ifeq ($(BR2_OPTIMIZE_0),y)
|
|
|
|
TARGET_OPTIMIZATION=-O0
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_OPTIMIZE_1),y)
|
|
|
|
TARGET_OPTIMIZATION=-O1
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_OPTIMIZE_2),y)
|
|
|
|
TARGET_OPTIMIZATION=-O2
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_OPTIMIZE_3),y)
|
|
|
|
TARGET_OPTIMIZATION=-O3
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_OPTIMIZE_S),y)
|
|
|
|
TARGET_OPTIMIZATION=-Os
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_DEBUG_1),y)
|
|
|
|
TARGET_DEBUGGING=-g1
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_DEBUG_2),y)
|
|
|
|
TARGET_DEBUGGING=-g2
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_DEBUG_3),y)
|
|
|
|
TARGET_DEBUGGING=-g3
|
|
|
|
endif
|
|
|
|
|
2005-01-23 12:20:30 +01:00
|
|
|
|
2007-09-28 22:10:22 +02:00
|
|
|
#########################################################################
|
2007-09-26 23:12:38 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
|
2007-06-20 13:26:36 +02:00
|
|
|
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \
|
2008-11-21 15:51:10 +01:00
|
|
|
-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
|
2008-11-07 09:15:53 +01:00
|
|
|
TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
|
2007-06-20 13:26:36 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
|
|
|
|
TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
|
2007-09-28 22:10:22 +02:00
|
|
|
TARGET_LDFLAGS+= $(BR2_SYSROOT)
|
2007-06-20 13:26:36 +02:00
|
|
|
endif
|
|
|
|
|
2007-07-23 14:03:17 +02:00
|
|
|
CC_TARGET_TUNE_:=$(strip $(subst ",,$(BR2_GCC_TARGET_TUNE)))
|
2007-07-23 13:37:25 +02:00
|
|
|
#"))
|
2007-07-23 14:03:17 +02:00
|
|
|
CC_TARGET_ARCH_:=$(strip $(subst ",,$(BR2_GCC_TARGET_ARCH)))
|
2007-07-23 13:37:25 +02:00
|
|
|
#"))
|
2007-07-23 14:03:17 +02:00
|
|
|
CC_TARGET_ABI_:=$(strip $(subst ",,$(BR2_GCC_TARGET_ABI)))
|
2007-07-23 13:37:25 +02:00
|
|
|
#"))
|
|
|
|
ifneq ($(CC_TARGET_TUNE_),)
|
|
|
|
TARGET_CFLAGS+=-mtune=$(CC_TARGET_TUNE_)
|
|
|
|
endif
|
|
|
|
ifneq ($(CC_TARGET_ARCH_),)
|
|
|
|
TARGET_CFLAGS+=-march=$(CC_TARGET_ARCH_)
|
|
|
|
endif
|
|
|
|
ifneq ($(CC_TARGET_ABI_),)
|
|
|
|
TARGET_CFLAGS+=-mabi=$(CC_TARGET_ABI_)
|
|
|
|
endif
|
|
|
|
|
2007-06-20 13:26:36 +02:00
|
|
|
ifneq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
ifeq ($(BR2_x86_64),y)
|
|
|
|
TARGET_CFLAGS+=-fPIC -DPIC
|
|
|
|
endif # PIC for dynamic objects on x86_64
|
|
|
|
endif
|
2007-06-26 16:02:29 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_SOFT_FLOAT),y)
|
|
|
|
TARGET_CFLAGS+=-msoft-float
|
|
|
|
endif
|
|
|
|
|
2009-01-18 11:51:53 +01:00
|
|
|
ifeq ($(BR2_VFP_FLOAT),y)
|
|
|
|
TARGET_CFLAGS+=-mfpu=vfp
|
|
|
|
endif
|
|
|
|
|
2007-09-17 23:50:54 +02:00
|
|
|
# enable VIS for v9a and v9b
|
|
|
|
ifeq ($(findstring y,$(BR2_sparc_v9a)$(BR2_sparc64_v9a)$(BR2_sparc_v9b)$(BR2_sparc64_v9b)),y)
|
2007-09-16 00:04:49 +02:00
|
|
|
TARGET_CFLAGS+=-mvis
|
|
|
|
endif
|
|
|
|
|
2007-10-02 23:36:49 +02:00
|
|
|
ifeq ($(findstring yy,$(BR2_mips)$(BR2_MIPS_ABI64)),yy)
|
|
|
|
TARGET_CFLAGS+=-fno-pic -mno-abicalls
|
|
|
|
endif
|
|
|
|
|
2008-08-04 21:07:18 +02:00
|
|
|
ifeq ($(BR2_LARGEFILE),y)
|
|
|
|
TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
|
|
endif
|
|
|
|
|
2009-01-24 12:27:47 +01:00
|
|
|
# Handle bug fixes in toolchain
|
|
|
|
ifeq ($(BR2_arm),y)
|
|
|
|
ifeq ($(BR2_GCC_VERSION_4_3_2),y)
|
|
|
|
# Removes segment violation in mpg123.
|
|
|
|
TARGET_CFLAGS+=-DARM_UNROLL_FIX
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2007-08-10 21:07:51 +02:00
|
|
|
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
|
2007-06-26 16:02:29 +02:00
|
|
|
|
2007-06-20 13:26:36 +02:00
|
|
|
# else it's an external toolchain
|
2007-06-26 16:02:29 +02:00
|
|
|
#########################################################################
|
2007-02-06 19:19:38 +01:00
|
|
|
else
|
2008-12-13 17:15:50 +01:00
|
|
|
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include --sysroot $(STAGING_DIR)/
|
2007-08-10 21:07:51 +02:00
|
|
|
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
|
2008-11-07 09:15:53 +01:00
|
|
|
TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
|
2007-02-06 19:19:38 +01:00
|
|
|
endif
|
2007-06-26 16:02:29 +02:00
|
|
|
#########################################################################
|
2007-10-18 07:56:05 +02:00
|
|
|
#ifeq ($(BR2_ROOTFS_SUFFIX),)
|
|
|
|
ROOTFS_SUFFIX:=$(strip $(subst ",, $(BR2_ROOTFS_SUFFIX)))
|
|
|
|
ifeq ($(ROOTFS_SUFFIX),)
|
2007-10-07 20:23:01 +02:00
|
|
|
ROOTFS_SUFFIX:=
|
|
|
|
else
|
2007-10-18 07:56:05 +02:00
|
|
|
XXXX=xxxx
|
2007-10-07 20:23:01 +02:00
|
|
|
ROOTFS_SUFFIX:=-$(BR2_ROOTFS_SUFFIX)
|
|
|
|
endif
|
2007-06-20 13:26:36 +02:00
|
|
|
|
2007-10-18 14:38:26 +02:00
|
|
|
ifeq ($(strip $(subst ",, $(BR2_FPU_SUFFIX))),y)
|
2007-10-30 11:30:59 +01:00
|
|
|
COND_ARCH_FPU_SUFFIX:=$(ARCH_FPU_SUFFIX)
|
2007-10-18 14:38:26 +02:00
|
|
|
else
|
|
|
|
COND_ARCH_FPU_SUFFIX:=
|
|
|
|
endif
|
|
|
|
|
2007-09-26 23:12:38 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
|
2007-10-18 14:38:26 +02:00
|
|
|
TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
|
2006-11-17 16:43:51 +01:00
|
|
|
|
2006-12-08 13:45:45 +01:00
|
|
|
# Quotes are needed for spaces et al in path components.
|
2007-06-20 13:26:36 +02:00
|
|
|
TARGET_PATH="$(TOOL_BUILD_DIR)/bin:$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(PATH)"
|
2007-10-18 14:38:26 +02:00
|
|
|
IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(ROOTFS_SUFFIX)
|
2004-10-09 03:06:03 +02:00
|
|
|
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
|
2007-06-20 13:26:36 +02:00
|
|
|
REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)
|
|
|
|
TARGET_CROSS=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-
|
|
|
|
KERNEL_CROSS=$(TARGET_CROSS)
|
2007-02-06 19:19:38 +01:00
|
|
|
else
|
|
|
|
TOOLCHAIN_EXTERNAL_PREFIX:=$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_PREFIX)))
|
|
|
|
#"))
|
|
|
|
TOOLCHAIN_EXTERNAL_PATH:=$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_PATH)))
|
|
|
|
#"))
|
2007-10-07 20:23:01 +02:00
|
|
|
#TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX)
|
2007-10-18 14:38:26 +02:00
|
|
|
TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
|
2008-12-15 23:07:38 +01:00
|
|
|
TARGET_PATH="$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)"
|
2007-10-07 20:23:01 +02:00
|
|
|
#IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(TOOLCHAIN_EXTERNAL_PREFIX)$(ROOTFS_SUFFIX)
|
2007-10-18 14:38:26 +02:00
|
|
|
IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(ROOTFS_SUFFIX)
|
2007-07-22 19:17:03 +02:00
|
|
|
|
2007-02-06 19:19:38 +01:00
|
|
|
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
|
2007-09-28 22:10:22 +02:00
|
|
|
TARGET_AR=$(TARGET_CROSS)ar
|
|
|
|
TARGET_AS=$(TARGET_CROSS)as
|
2004-10-09 03:06:03 +02:00
|
|
|
TARGET_CC=$(TARGET_CROSS)gcc
|
2007-09-29 00:15:19 +02:00
|
|
|
TARGET_CPP=$(TARGET_CROSS)cpp
|
2006-01-25 18:28:23 +01:00
|
|
|
TARGET_CXX=$(TARGET_CROSS)g++
|
2007-09-29 00:15:19 +02:00
|
|
|
ifeq ($(BR2_GCC_VERSION_3_4_6),y)
|
|
|
|
TARGET_FC=$(TARGET_CROSS)g77
|
|
|
|
else
|
|
|
|
TARGET_FC=$(TARGET_CROSS)gfortran
|
|
|
|
endif
|
2007-09-28 22:10:22 +02:00
|
|
|
TARGET_LD=$(TARGET_CROSS)ld
|
2007-09-29 00:15:19 +02:00
|
|
|
TARGET_NM=$(TARGET_CROSS)nm
|
2005-05-18 05:42:51 +02:00
|
|
|
TARGET_RANLIB=$(TARGET_CROSS)ranlib
|
2007-09-28 22:10:22 +02:00
|
|
|
TARGET_OBJCOPY=$(TARGET_CROSS)objcopy
|
2007-09-29 00:15:19 +02:00
|
|
|
TARGET_OBJDUMP=$(TARGET_CROSS)objdump
|
2008-01-10 10:29:06 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
|
|
|
|
TARGET_LDCONFIG=/sbin/ldconfig
|
|
|
|
else
|
2007-08-08 16:58:47 +02:00
|
|
|
TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig
|
2008-01-10 10:29:06 +01:00
|
|
|
endif
|
2007-07-31 20:06:50 +02:00
|
|
|
ifeq ($(BR2_STRIP_strip),y)
|
2007-08-21 03:53:57 +02:00
|
|
|
STRIP_DISCARD_ALL:=--discard-all
|
|
|
|
STRIP_STRIP_UNNEEDED:=--strip-unneeded
|
2007-08-22 14:35:41 +02:00
|
|
|
STRIP_STRIP_ALL:=--strip-all
|
2007-08-21 03:53:57 +02:00
|
|
|
REMOVE_SECTION_COMMENT:=--remove-section=.comment
|
|
|
|
REMOVE_SECTION_NOTE:=--remove-section=.note
|
2007-10-01 18:15:31 +02:00
|
|
|
TARGET_STRIP=$(TARGET_CROSS)strip
|
|
|
|
STRIPCMD=$(TARGET_CROSS)strip $(REMOVE_SECTION_COMMENT) $(REMOVE_SECTION_NOTE)
|
2007-07-31 20:06:50 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_STRIP_sstrip),y)
|
2007-08-21 03:53:57 +02:00
|
|
|
STRIP_DISCARD_ALL:=
|
|
|
|
STRIP_STRIP_UNNEEDED:=
|
|
|
|
STRIP_STRIP_ALL:=
|
|
|
|
REMOVE_SECTION_COMMENT:=
|
|
|
|
REMOVE_SECTION_NOTE:=
|
2007-09-29 16:27:39 +02:00
|
|
|
TARGET_STRIP=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-sstrip
|
2007-10-01 18:15:31 +02:00
|
|
|
STRIPCMD=$(TARGET_STRIP)
|
2007-07-31 20:06:50 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_STRIP_none),y)
|
2007-09-29 16:27:39 +02:00
|
|
|
TARGET_STRIP=true -Not_stripping
|
2007-10-01 18:15:31 +02:00
|
|
|
STRIPCMD=$(TARGET_STRIP)
|
2007-07-31 20:06:50 +02:00
|
|
|
endif
|
2007-09-29 00:15:19 +02:00
|
|
|
INSTALL=/usr/bin/install
|
2009-01-01 22:20:35 +01:00
|
|
|
FLEX:=$(shell which flex || type -p flex)
|
|
|
|
BISON:=$(shell which bison || type -p bison)
|
2004-10-09 03:06:03 +02:00
|
|
|
|
2009-01-19 10:18:46 +01:00
|
|
|
# hostcc version as an integer - E.G. 4.3.2 => 432
|
|
|
|
HOSTCC_VERSION:=$(shell $(HOSTCC) --version | \
|
|
|
|
sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p')
|
|
|
|
|
2004-10-09 03:06:03 +02:00
|
|
|
HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
|
|
|
|
-e 's/sparc.*/sparc/' \
|
|
|
|
-e 's/arm.*/arm/g' \
|
|
|
|
-e 's/m68k.*/m68k/' \
|
|
|
|
-e 's/ppc/powerpc/g' \
|
|
|
|
-e 's/v850.*/v850/g' \
|
|
|
|
-e 's/sh[234]/sh/' \
|
|
|
|
-e 's/mips-.*/mips/' \
|
|
|
|
-e 's/mipsel-.*/mipsel/' \
|
|
|
|
-e 's/cris.*/cris/' \
|
|
|
|
-e 's/i[3-9]86/i386/' \
|
|
|
|
)
|
2005-12-27 09:42:13 +01:00
|
|
|
GNU_HOST_NAME:=$(HOST_ARCH)-$(subst ",,$(BR2_GNU_BUILD_SUFFIX))
|
2006-11-17 16:43:51 +01:00
|
|
|
#")
|
2008-11-28 15:20:47 +01:00
|
|
|
|
|
|
|
AUTO_CONFIGURE_TARGET=\
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
|
|
$(TARGET_CONFIGURE_ENV) \
|
|
|
|
$(if $(THIS_SRCDIR),$(THIS_SRCDIR)/,./)configure \
|
|
|
|
$(if $(BR2_CONFIG_CACHE),--cache-file="$(PROJECT_BUILD_DIR)/tgt-config.cache",) \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME)
|
|
|
|
|
2004-10-09 03:06:03 +02:00
|
|
|
TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
|
2007-09-29 16:27:39 +02:00
|
|
|
AR="$(TARGET_AR)" \
|
|
|
|
AS="$(TARGET_AS)" \
|
2008-11-28 15:20:47 +01:00
|
|
|
LD="$(TARGET_LD)" \
|
2007-09-29 16:27:39 +02:00
|
|
|
NM="$(TARGET_NM)" \
|
2007-09-29 00:15:19 +02:00
|
|
|
CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
|
|
|
|
GCC="$(TARGET_CC) $(TARGET_CFLAGS)" \
|
|
|
|
CPP="$(TARGET_CPP) $(TARGET_CFLAGS)" \
|
|
|
|
CXX="$(TARGET_CXX) $(TARGET_CXXFLAGS)" \
|
|
|
|
FC="$(TARGET_FC) $(TARGET_FCFLAGS)" \
|
2007-09-29 16:27:39 +02:00
|
|
|
RANLIB="$(TARGET_RANLIB)" \
|
|
|
|
STRIP="$(TARGET_STRIP)" \
|
|
|
|
OBJCOPY="$(TARGET_OBJCOPY)" \
|
2007-06-20 13:26:36 +02:00
|
|
|
AR_FOR_BUILD="$(HOSTAR)" \
|
|
|
|
AS_FOR_BUILD="$(HOSTAS)" \
|
|
|
|
CC_FOR_BUILD="$(HOSTCC)" \
|
2007-09-28 21:49:13 +02:00
|
|
|
GCC_FOR_BUILD="$(HOSTCC)" \
|
2007-06-20 13:26:36 +02:00
|
|
|
CXX_FOR_BUILD="$(HOSTCXX)" \
|
2007-09-28 22:10:22 +02:00
|
|
|
FC_FOR_BUILD="$(HOSTFC)" \
|
2007-06-20 13:26:36 +02:00
|
|
|
LD_FOR_BUILD="$(HOSTLD)" \
|
|
|
|
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
|
2007-08-10 21:07:51 +02:00
|
|
|
CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \
|
2007-06-20 13:26:36 +02:00
|
|
|
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
|
2007-09-28 22:10:22 +02:00
|
|
|
FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \
|
2007-09-29 16:27:39 +02:00
|
|
|
AR_FOR_TARGET="$(TARGET_AR)" \
|
|
|
|
AS_FOR_TARGET="$(TARGET_AS)" \
|
|
|
|
CC_FOR_TARGET="$(TARGET_CC)" \
|
|
|
|
LD_FOR_TARGET="$(TARGET_LD)" \
|
|
|
|
NM_FOR_TARGET="$(TARGET_NM)" \
|
|
|
|
DEFAULT_ASSEMBLER="$(TARGET_AS)" \
|
|
|
|
DEFAULT_LINKER="$(TARGET_LD)" \
|
2008-06-14 23:00:59 +02:00
|
|
|
PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
|
2007-08-10 21:07:51 +02:00
|
|
|
PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" \
|
|
|
|
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
|
|
|
|
STAGING_DIR="$(STAGING_DIR)"
|
2007-06-20 13:26:36 +02:00
|
|
|
|
2008-11-28 15:20:47 +01:00
|
|
|
TARGET_CONFIGURE_ENV=\
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CXXFLAGS="$(TARGET_CXXFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
FCFLAGS="$(TARGET_FCFLAGS)" \
|
|
|
|
|
2007-06-20 13:26:36 +02:00
|
|
|
HOST_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
|
2007-09-28 21:49:13 +02:00
|
|
|
AR="$(HOSTAR)" \
|
|
|
|
AS="$(HOSTAS)" \
|
|
|
|
LD="$(HOSTLD) $(HOST_LDFLAGS)" \
|
|
|
|
NM="$(HOSTNM)" \
|
|
|
|
CC="$(HOSTCC) $(HOST_CFLAGS)" \
|
|
|
|
GCC="$(HOSTCC) $(HOST_CFLAGS)" \
|
2007-09-28 22:10:22 +02:00
|
|
|
CXX="$(HOSTCXX) $(HOST_CXXFLAGS)" \
|
2007-09-28 21:49:13 +02:00
|
|
|
CPP="$(HOSTCPP) $(HOST_CFLAGS)" \
|
2007-06-20 13:26:36 +02:00
|
|
|
AR_FOR_BUILD="$(HOSTAR)" \
|
|
|
|
AS_FOR_BUILD="$(HOSTAS)" \
|
2007-01-14 04:48:13 +01:00
|
|
|
CC_FOR_BUILD="$(HOSTCC)" \
|
2007-06-20 13:26:36 +02:00
|
|
|
GCC_FOR_BUILD="$(HOSTCC)" \
|
|
|
|
CXX_FOR_BUILD="$(HOSTCXX)" \
|
|
|
|
LD_FOR_BUILD="$(HOSTLD)" \
|
2007-09-28 22:10:22 +02:00
|
|
|
FC_FOR_BUILD="$(HOSTFC)" \
|
2007-06-20 13:26:36 +02:00
|
|
|
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
|
|
|
|
CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \
|
|
|
|
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
|
2007-09-28 22:10:22 +02:00
|
|
|
FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \
|
2007-09-29 16:27:39 +02:00
|
|
|
AR_FOR_TARGET="$(TARGET_AR)" \
|
|
|
|
AS_FOR_TARGET="$(TARGET_AS)" \
|
|
|
|
CC_FOR_TARGET="$(TARGET_CC)" \
|
|
|
|
LD_FOR_TARGET="$(TARGET_LD)" \
|
|
|
|
NM_FOR_TARGET="$(TARGET_NM)" \
|
|
|
|
RANLIB_FOR_TARGET="$(TARGET_RANLIB)" \
|
|
|
|
STRIP_FOR_TARGET="$(TARGET_STRIP)" \
|
|
|
|
OBJCOPY_FOR_TARGET="$(TARGET_OBJCOPY)" \
|
|
|
|
OBJDUMP_FOR_TARGET="$(TARGET_OBJDUMP)" \
|
|
|
|
DEFAULT_ASSEMBLER="$(TARGET_AS)" \
|
|
|
|
DEFAULT_LINKER="$(TARGET_LD)" \
|
|
|
|
ORIGINAL_AS_FOR_TARGET="$(TARGET_AS)" \
|
|
|
|
ORIGINAL_LD_FOR_TARGET="$(TARGET_LD)" \
|
|
|
|
ORIGINAL_NM_FOR_TARGET="$(TARGET_NM)" \
|
|
|
|
ORIGINAL_OBJDUMP_FOR_TARGET="$(TARGET_OBJDUMP)"
|
2007-06-20 13:26:36 +02:00
|
|
|
|
2007-06-27 11:48:23 +02:00
|
|
|
#######################################################################
|
|
|
|
# settings we need to pass to configure
|
|
|
|
|
|
|
|
# does unaligned access trap?
|
|
|
|
BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=yes
|
|
|
|
ifeq ($(BR2_i386),y)
|
|
|
|
BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_x86_64),y)
|
|
|
|
BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_m68k),y)
|
|
|
|
BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_powerpc)$(BR2_ENDIAN),yBIG)
|
|
|
|
BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
|
|
|
|
endif
|
|
|
|
|
2007-06-27 14:01:27 +02:00
|
|
|
ifeq ($(BR2_ENDIAN),"BIG")
|
|
|
|
BR2_AC_CV_C_BIGENDIAN=ac_cv_c_bigendian=yes
|
|
|
|
else
|
|
|
|
BR2_AC_CV_C_BIGENDIAN=ac_cv_c_bigendian=no
|
|
|
|
endif
|
|
|
|
|
2007-09-27 23:58:46 +02:00
|
|
|
# XXX: FIXME: We would need to grab MALLOC_GLIBC_COMPAT from the uClibc.config
|
|
|
|
# Including it doesn't seem wise, grepping is ugly.. Suggestions?
|
2007-09-20 19:26:59 +02:00
|
|
|
# Does malloc return live pointer for malloc(0) ?
|
|
|
|
ifeq ($(MALLOC_GLIBC_COMPAT),y)
|
|
|
|
BR2_AC_CV_FUNC_MALLOC_0_NONNULL=ac_cv_func_malloc_0_nonnull=yes \
|
|
|
|
gl_cv_func_malloc_0_nonnull=yes \
|
|
|
|
ac_cv_func_realloc_0_nonnull=yes
|
|
|
|
else
|
|
|
|
BR2_AC_CV_FUNC_MALLOC_0_NONNULL=ac_cv_func_malloc_0_nonnull=no \
|
|
|
|
gl_cv_func_malloc_0_nonnull=no \
|
|
|
|
ac_cv_func_realloc_0_nonnull=no
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2007-06-27 11:48:23 +02:00
|
|
|
TARGET_CONFIGURE_ARGS= \
|
|
|
|
$(BR2_AC_CV_TRAP_CHECK) \
|
2007-06-27 14:01:27 +02:00
|
|
|
ac_cv_func_mmap_fixed_mapped=yes \
|
|
|
|
ac_cv_func_memcmp_working=yes \
|
2008-11-28 15:20:47 +01:00
|
|
|
ac_cv_have_decl_malloc=yes \
|
|
|
|
gl_cv_func_malloc_0_nonnull=yes \
|
|
|
|
ac_cv_func_malloc_0_nonnull=yes \
|
|
|
|
ac_cv_func_calloc_0_nonnull=yes \
|
|
|
|
ac_cv_func_realloc_0_nonnull=yes \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(BR2_AC_CV_C_BIGENDIAN)
|
2004-10-09 03:06:03 +02:00
|
|
|
|
2007-06-27 11:48:23 +02:00
|
|
|
#######################################################################
|
|
|
|
|
2006-10-17 18:57:02 +02:00
|
|
|
ifeq ($(BR2_ENABLE_LOCALE),y)
|
2004-10-09 03:06:03 +02:00
|
|
|
DISABLE_NLS:=
|
|
|
|
else
|
|
|
|
DISABLE_NLS:=--disable-nls
|
|
|
|
endif
|
|
|
|
|
2006-12-21 14:51:53 +01:00
|
|
|
ifneq ($(BR2_LARGEFILE),y)
|
|
|
|
DISABLE_LARGEFILE= --disable-largefile
|
|
|
|
endif
|
|
|
|
|
2009-01-17 11:11:12 +01:00
|
|
|
ifneq ($(BR2_HAVE_DOCUMENTATION),y)
|
|
|
|
DISABLE_DOCUMENTATION=--without-html-dir --disable-gtk-doc
|
|
|
|
endif
|
|
|
|
|
2007-06-26 18:34:45 +02:00
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
|
|
|
DISABLE_IPV6= --disable-ipv6
|
|
|
|
endif
|
|
|
|
|
2007-07-31 17:10:55 +02:00
|
|
|
ifneq ($(BR2_GCC_CROSS_CXX),y)
|
2006-12-21 14:51:53 +01:00
|
|
|
TARGET_CONFIGURE_OPTS+=CXX=""
|
|
|
|
endif
|
2004-10-09 03:06:03 +02:00
|
|
|
|
2008-03-11 19:15:30 +01:00
|
|
|
ifeq ($(BR2_ENABLE_DEBUG),y)
|
|
|
|
ENABLE_DEBUG:=--enable-debug
|
|
|
|
else
|
|
|
|
ENABLE_DEBUG:=
|
|
|
|
endif
|
2007-06-20 13:26:36 +02:00
|
|
|
|
2007-06-27 11:48:23 +02:00
|
|
|
|
2007-02-04 20:47:41 +01:00
|
|
|
# X Windowing system
|
|
|
|
|
|
|
|
XSERVER:=
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_TINYX),y)
|
2007-02-04 20:47:41 +01:00
|
|
|
XSERVER+=tinyx
|
|
|
|
endif
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_XORG),y)
|
2007-02-04 20:47:41 +01:00
|
|
|
XSERVER+=xorg
|
|
|
|
endif
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
2007-09-12 06:37:31 +02:00
|
|
|
XSERVER+=xserver_xorg-server
|
|
|
|
endif
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_XGGI),y)
|
2007-02-04 20:47:41 +01:00
|
|
|
XSERVER+=xggi
|
|
|
|
endif
|
|
|
|
|
2007-08-29 01:02:52 +02:00
|
|
|
X11_PREFIX:=$(strip $(subst ",, $(BR2_X11_PREFIX)))
|
|
|
|
#"))
|
|
|
|
|
2007-08-10 21:07:51 +02:00
|
|
|
include package/Makefile.autotools.in
|