aboutsummaryrefslogtreecommitdiffstats
path: root/include/nls.mk
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-05 10:12:53 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-05 10:12:53 +0000
commit5c105d9f3fd086aff195d3849dcf847d6b0bd927 (patch)
tree1229a11f725bfa58aa7c57a76898553bb5f6654a /include/nls.mk
downloadopenwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.tar.gz
openwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.zip
branch Attitude Adjustment
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/nls.mk')
-rw-r--r--include/nls.mk40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/nls.mk b/include/nls.mk
new file mode 100644
index 000000000..19456640c
--- /dev/null
+++ b/include/nls.mk
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2011-2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# iconv full
+ifeq ($(CONFIG_BUILD_NLS),y)
+ ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-full
+ ICONV_FULL:=1
+
+ INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full
+ INTL_FULL:=1
+
+# iconv stub
+else
+ ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-stub
+ ICONV_FULL:=
+
+ INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-stub
+ INTL_FULL:=
+endif
+
+PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
+PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:libintl
+
+ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
+ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
+ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
+ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib
+
+INTL_DEPENDS:=+BUILD_NLS:libintl-full
+INTL_CFLAGS:=-I$(INTL_PREFIX)/include
+INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
+INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib
+
+TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS)
+TARGET_CPPFLAGS += $(ICONV_CFLAGS) $(INTL_CPPFLAGS)
+TARGET_LDFLAGS += $(ICONV_LDFLAGS) $(INTL_LDFLAGS)