1
0

nls.mk 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #
  2. # Copyright (C) 2011-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # iconv full
  8. ifeq ($(CONFIG_BUILD_NLS),y)
  9. ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-full
  10. ICONV_FULL:=1
  11. INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full
  12. INTL_FULL:=1
  13. # iconv stub
  14. else
  15. ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-stub
  16. ICONV_FULL:=
  17. INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-stub
  18. INTL_FULL:=
  19. endif
  20. PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
  21. PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext
  22. ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
  23. ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
  24. ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
  25. ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib
  26. INTL_DEPENDS:=+BUILD_NLS:libintl-full
  27. INTL_CFLAGS:=-I$(INTL_PREFIX)/include
  28. INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
  29. INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib
  30. TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS)
  31. TARGET_CPPFLAGS += $(ICONV_CPPFLAGS) $(INTL_CPPFLAGS)
  32. TARGET_LDFLAGS += $(ICONV_LDFLAGS) $(INTL_LDFLAGS)