1
0

nls.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Copyright (C) 2011-2020 OpenWrt.org
  4. # iconv full
  5. ifeq ($(CONFIG_BUILD_NLS),y)
  6. ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-full
  7. ICONV_FULL:=1
  8. INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full
  9. INTL_FULL:=1
  10. CMAKE_OPTIONS += -DCMAKE_PREFIX_PATH="$(ICONV_PREFIX);$(INTL_PREFIX)"
  11. else
  12. ICONV_PREFIX:=
  13. ICONV_FULL:=
  14. INTL_PREFIX:=
  15. INTL_FULL:=
  16. endif
  17. PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
  18. ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
  19. ifeq ($(CONFIG_BUILD_NLS),y)
  20. ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
  21. ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
  22. ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib
  23. else
  24. ICONV_CFLAGS:=
  25. ICONV_CPPFLAGS:=
  26. ICONV_LDFLAGS:=
  27. endif
  28. INTL_DEPENDS:=+BUILD_NLS:libintl-full
  29. ifeq ($(CONFIG_BUILD_NLS),y)
  30. INTL_CFLAGS:=-I$(INTL_PREFIX)/include
  31. INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
  32. INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib
  33. else
  34. INTL_CFLAGS:=
  35. INTL_CPPFLAGS:=
  36. INTL_LDFLAGS:=
  37. endif
  38. TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS)
  39. TARGET_CPPFLAGS += $(ICONV_CPPFLAGS) $(INTL_CPPFLAGS)
  40. TARGET_LDFLAGS += $(ICONV_LDFLAGS) $(INTL_LDFLAGS)