X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=rules.mk;h=5ed8000e05277a24cae1a544a60d6b2b44f8aeed;hb=a2c5540727a93a219a633e8d1276ee747b9e56d0;hp=59ab50b92262510fbc7fab3d9f64aa3adaa655c0;hpb=be5d8e6c878c92f8100c634af01c302717704b2f;p=openwrt%2Fopenwrt.git diff --git a/rules.mk b/rules.mk index 59ab50b922..5ed8000e05 100644 --- a/rules.mk +++ b/rules.mk @@ -14,7 +14,7 @@ endif include $(TOPDIR)/include/debug.mk include $(TOPDIR)/include/verbose.mk -TMP_DIR:=$(TOPDIR)/tmp +export TMP_DIR:=$(TOPDIR)/tmp GREP_OPTIONS= export GREP_OPTIONS @@ -63,6 +63,15 @@ endif ifneq ($(filter -mips%r2,$(TARGET_OPTIMIZATION)),) ARCH_SUFFIX:=_r2 endif +ifneq ($(filter -mdsp,$(TARGET_OPTIMIZATION)),) + ARCH_SUFFIX:=$(ARCH_SUFFIX)_dsp +endif +ifneq ($(filter -mdspr2,$(TARGET_OPTIMIZATION)),) + ARCH_SUFFIX:=$(ARCH_SUFFIX)_dspr2 +endif +ifdef CONFIG_USE_MIPS16 + TARGET_OPTIMIZATION+= -minterlink-mips16 -mips16 +endif ifneq ($(findstring -mips16,$(TARGET_OPTIMIZATION)),) TARGET_ASFLAGS_OVERRIDE:=-mno-mips16 ARCH_SUFFIX:= $(ARCH_SUFFIX)_m16 @@ -70,6 +79,11 @@ endif ifdef CONFIG_HAS_SPE_FPU TARGET_SUFFIX:=$(TARGET_SUFFIX)spe endif +ifdef CONFIG_MIPS64_ABI + ifneq ($(CONFIG_MIPS64_ABI_O32),y) + ARCH_SUFFIX:=$(ARCH_SUFFIX)_$(call qstrip,$(CONFIG_MIPS64_ABI)) + endif +endif DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl) BIN_DIR:=$(TOPDIR)/bin/$(BOARD) @@ -129,7 +143,7 @@ endif LIBRPC=-lrpc LIBRPC_DEPENDS=+librpc -ifneq ($(findstring $(ARCH) , mips64 x86_64 ),) +ifeq ($(CONFIG_ARCH_64BIT),y) LIB_SUFFIX:=64 endif @@ -188,11 +202,12 @@ HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib TARGET_CC:=$(TARGET_CROSS)gcc TARGET_AR:=$(TARGET_CROSS)ar TARGET_RANLIB:=$(TARGET_CROSS)ranlib -TARGET_CXX:=$(if $(CONFIG_INSTALL_LIBSTDCPP),$(TARGET_CROSS)g++,no) +TARGET_CXX:=$(TARGET_CROSS)g++ KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh SED:=$(STAGING_DIR_HOST)/bin/sed -i -e CP:=cp -fpR LN:=ln -sf +XARGS:=xargs -r INSTALL_BIN:=install -m0755 INSTALL_DIR:=install -d -m0755