1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# libclc 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun# Use the latest commit from release_90 branch. 8*4882a593SmuzhiyunLIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060 9*4882a593SmuzhiyunLIBCLC_SITE = https://github.com/llvm-mirror/libclc 10*4882a593SmuzhiyunLIBCLC_SITE_METHOD = git 11*4882a593SmuzhiyunLIBCLC_LICENSE = Apache-2.0 with exceptions or MIT 12*4882a593SmuzhiyunLIBCLC_LICENSE_FILES = LICENSE.TXT 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunLIBCLC_DEPENDENCIES = host-clang host-llvm 15*4882a593SmuzhiyunLIBCLC_INSTALL_STAGING = YES 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun# C++ compiler is used to build a small tool (prepare-builtins) for the host. 18*4882a593Smuzhiyun# It must be built with the C++ compiler from the host. 19*4882a593Smuzhiyun# 20*4882a593Smuzhiyun# The headers are installed in /usr/share and not /usr/include, 21*4882a593Smuzhiyun# because they are needed at runtime on the target to build the OpenCL 22*4882a593Smuzhiyun# kernels. 23*4882a593SmuzhiyunLIBCLC_CONF_OPTS = \ 24*4882a593Smuzhiyun --with-llvm-config=$(HOST_DIR)/usr/bin/llvm-config \ 25*4882a593Smuzhiyun --prefix=/usr \ 26*4882a593Smuzhiyun --includedir=/usr/share \ 27*4882a593Smuzhiyun --pkgconfigdir=/usr/lib/pkgconfig \ 28*4882a593Smuzhiyun --with-cxx-compiler=$(HOSTCXX_NOCCACHE) 29*4882a593Smuzhiyun 30*4882a593Smuzhiyundefine LIBCLC_CONFIGURE_CMDS 31*4882a593Smuzhiyun (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)) 32*4882a593Smuzhiyunendef 33*4882a593Smuzhiyun 34*4882a593Smuzhiyundefine LIBCLC_BUILD_CMDS 35*4882a593Smuzhiyun $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) 36*4882a593Smuzhiyunendef 37*4882a593Smuzhiyun 38*4882a593Smuzhiyundefine LIBCLC_INSTALL_TARGET_CMDS 39*4882a593Smuzhiyun $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install 40*4882a593Smuzhiyunendef 41*4882a593Smuzhiyun 42*4882a593Smuzhiyundefine LIBCLC_INSTALL_STAGING_CMDS 43*4882a593Smuzhiyun $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install 44*4882a593Smuzhiyunendef 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun$(eval $(generic-package)) 47