libclc.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ################################################################################
  2. #
  3. # libclc
  4. #
  5. ################################################################################
  6. # Use the latest commit from release_90 branch.
  7. LIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060
  8. LIBCLC_SITE = https://git.llvm.org/git/libclc
  9. LIBCLC_SITE_METHOD = git
  10. LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT
  11. LIBCLC_LICENSE_FILES = LICENSE.TXT
  12. LIBCLC_DEPENDENCIES = host-clang host-llvm
  13. LIBCLC_INSTALL_STAGING = YES
  14. # C++ compiler is used to build a small tool (prepare-builtins) for the host.
  15. # It must be built with the C++ compiler from the host.
  16. #
  17. # The headers are installed in /usr/share and not /usr/include,
  18. # because they are needed at runtime on the target to build the OpenCL
  19. # kernels.
  20. LIBCLC_CONF_OPTS = \
  21. --with-llvm-config=$(HOST_DIR)/usr/bin/llvm-config \
  22. --prefix=/usr \
  23. --includedir=/usr/share \
  24. --pkgconfigdir=/usr/lib/pkgconfig \
  25. --with-cxx-compiler=$(HOSTCXX_NOCCACHE)
  26. define LIBCLC_CONFIGURE_CMDS
  27. (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS))
  28. endef
  29. define LIBCLC_BUILD_CMDS
  30. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
  31. endef
  32. define LIBCLC_INSTALL_TARGET_CMDS
  33. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
  34. endef
  35. define LIBCLC_INSTALL_STAGING_CMDS
  36. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
  37. endef
  38. $(eval $(generic-package))