X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=rules.mk;h=d36c99495310c2558f8c32b5ac5dbff65e53780a;hb=b14c8e57db6d9aa98b4c49e9036d4638bcd788ff;hp=9d5fcd72b408d060c74135bb79da48cdb9521e38;hpb=6db7ad74f61eeaae0c8ecb08d483599d9d80c53f;p=openwrt.git diff --git a/rules.mk b/rules.mk index 9d5fcd72b4..d36c994953 100644 --- a/rules.mk +++ b/rules.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2007 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -23,7 +23,7 @@ $(strip $(subst ",,$(1))) endef #")) -ARCH:=$(call qstrip,$(CONFIG_ARCH)) +ARCH:=$(call qstrip,$(shell echo $(CONFIG_ARCH) | sed -e 's/i[3-9]86/i386/')) BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD)) TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION)) BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX)) @@ -32,7 +32,7 @@ SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) OPTIMIZE_FOR_CPU:=$(ARCH) -DL_DIR:=$(TOPDIR)/dl +DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl) BIN_DIR:=$(TOPDIR)/bin INCLUDE_DIR:=$(TOPDIR)/include SCRIPT_DIR:=$(TOPDIR)/scripts @@ -62,6 +62,12 @@ TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib export PATH:=$(TARGET_PATH) +export STAGING_DIR +export GCC_HONOUR_COPTS:=0 + +PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config + +export PKG_CONFIG LINUX_HEADERS_DIR:=$(BUILD_DIR_TOOLCHAIN)/linux @@ -132,6 +138,14 @@ $(call shvar,$(1))=$$(call $(1)) export $(call shvar,$(1)) endef +empty:= +space:= $(empty) $(empty) +merge=$(subst $(space),,$(1)) +confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n))) + +# file extension +ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1))) + all: FORCE: ; .PHONY: FORCE